Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1561


Ignore:
Timestamp:
04/15/09 18:55:24 (16 years ago)
Author:
dwagner
Message:

Added functionality: Checkbox to enable/disable Markers for every datapoint added to OptionsDialog. (#581)

Location:
trunk/sources/HeuristicLab.Visualization/3.2
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Visualization/3.2/DataRow.cs

    r1530 r1561  
    3030
    3131    public DataRow(string label, Color color, int thickness, DrawingStyle style, List<double> dataRow) {
    32      this.Label = label;
     32      this.Label = label;
    3333      this.Color = color;
    3434      this.Thickness = thickness;
    3535      this.Style = style;
     36      this.dataRow = dataRow;
     37      this.ShowMarkers = true;
     38    }
     39
     40    public DataRow(string label, Color color, int thickness, DrawingStyle style, List<double> dataRow, bool showMarkers) {
     41      this.Label = label;
     42      this.Color = color;
     43      this.Thickness = thickness;
     44      this.Style = style;
     45      this.ShowMarkers = showMarkers;
    3646      this.dataRow = dataRow;
    3747    }
  • trunk/sources/HeuristicLab.Visualization/3.2/DataRowBase.cs

    r1530 r1561  
    99    private DataRowType lineType = DataRowType.Normal;
    1010    private YAxisDescriptor yAxis;
     11    private bool showMarkers = true;
     12
     13    public bool ShowMarkers {
     14      get { return showMarkers; }
     15      set {
     16        showMarkers = value;
     17        OnDataRowChanged(this);
     18      }
     19    }         
    1120
    1221    public string Label {
  • trunk/sources/HeuristicLab.Visualization/3.2/IDataRow.cs

    r1530 r1561  
    1212    DrawingStyle Style { get; set; }
    1313    DataRowType LineType { get; set; }
     14    bool ShowMarkers { get; set; }
    1415 
    1516    YAxisDescriptor YAxis { get; set; }
  • trunk/sources/HeuristicLab.Visualization/3.2/LineChart.cs

    r1559 r1561  
    389389        }
    390390      } else {
     391        rowEntry.showMarkers(row.ShowMarkers);
    391392        for (int i = 1; i < row.Count; i++) {
    392393          LineShape lineShape = new LineShape(i - 1, row[i - 1], i, row[i], row.Color, row.Thickness, row.Style);
     
    602603          }
    603604        }
     605        this.markersShape.ShowChildShapes = row.ShowMarkers;
    604606      }
    605607
     
    648650      }
    649651
    650       public void hideMarkers() {
    651         linesShape.markersShape.ShowChildShapes = false;
    652       }
    653 
    654       public void showMarkers() {
    655         linesShape.markersShape.ShowChildShapes = true;
     652      public void showMarkers(bool flag) {
     653        linesShape.markersShape.ShowChildShapes = flag;
    656654      }
    657655    }
  • trunk/sources/HeuristicLab.Visualization/3.2/Options/OptionsDialog.Designer.cs

    r1459 r1561  
    4848      this.btnChangeXAxisFont = new System.Windows.Forms.Button();
    4949      this.tpYAxes = new System.Windows.Forms.TabPage();
     50      this.gbxYAxisClipChangeable = new System.Windows.Forms.GroupBox();
     51      this.flpYAxisClipChangeable = new System.Windows.Forms.FlowLayoutPanel();
    5052      this.gbxShowYAxis = new System.Windows.Forms.GroupBox();
    51       this.gbxYAxisClipChangeable = new System.Windows.Forms.GroupBox();
    5253      this.flpShowYAxis = new System.Windows.Forms.FlowLayoutPanel();
    53       this.flpYAxisClipChangeable = new System.Windows.Forms.FlowLayoutPanel();
     54      this.MarkercheckBox = new System.Windows.Forms.CheckBox();
    5455      this.tpTitle.SuspendLayout();
    5556      this.tabPage2.SuspendLayout();
     
    5960      this.tpXAxis.SuspendLayout();
    6061      this.tpYAxes.SuspendLayout();
     62      this.gbxYAxisClipChangeable.SuspendLayout();
    6163      this.gbxShowYAxis.SuspendLayout();
    62       this.gbxYAxisClipChangeable.SuspendLayout();
    6364      this.SuspendLayout();
    6465      //
     
    224225      // groupBox1
    225226      //
     227      this.groupBox1.Controls.Add(this.MarkercheckBox);
    226228      this.groupBox1.Controls.Add(this.label4);
    227229      this.groupBox1.Controls.Add(this.LineThicknessCB);
     
    307309      this.tpYAxes.UseVisualStyleBackColor = true;
    308310      //
     311      // gbxYAxisClipChangeable
     312      //
     313      this.gbxYAxisClipChangeable.AutoSize = true;
     314      this.gbxYAxisClipChangeable.Controls.Add(this.flpYAxisClipChangeable);
     315      this.gbxYAxisClipChangeable.Location = new System.Drawing.Point(0, 82);
     316      this.gbxYAxisClipChangeable.Name = "gbxYAxisClipChangeable";
     317      this.gbxYAxisClipChangeable.Size = new System.Drawing.Size(281, 76);
     318      this.gbxYAxisClipChangeable.TabIndex = 1;
     319      this.gbxYAxisClipChangeable.TabStop = false;
     320      this.gbxYAxisClipChangeable.Text = "Y-Axis-Clip changeable";
     321      //
     322      // flpYAxisClipChangeable
     323      //
     324      this.flpYAxisClipChangeable.AutoSize = true;
     325      this.flpYAxisClipChangeable.Dock = System.Windows.Forms.DockStyle.Fill;
     326      this.flpYAxisClipChangeable.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
     327      this.flpYAxisClipChangeable.Location = new System.Drawing.Point(3, 16);
     328      this.flpYAxisClipChangeable.Name = "flpYAxisClipChangeable";
     329      this.flpYAxisClipChangeable.Size = new System.Drawing.Size(275, 57);
     330      this.flpYAxisClipChangeable.TabIndex = 0;
     331      //
    309332      // gbxShowYAxis
    310333      //
     
    318341      this.gbxShowYAxis.Text = "Show Y-Axis";
    319342      //
    320       // gbxYAxisClipChangeable
    321       //
    322       this.gbxYAxisClipChangeable.AutoSize = true;
    323       this.gbxYAxisClipChangeable.Controls.Add(this.flpYAxisClipChangeable);
    324       this.gbxYAxisClipChangeable.Location = new System.Drawing.Point(0, 82);
    325       this.gbxYAxisClipChangeable.Name = "gbxYAxisClipChangeable";
    326       this.gbxYAxisClipChangeable.Size = new System.Drawing.Size(281, 76);
    327       this.gbxYAxisClipChangeable.TabIndex = 1;
    328       this.gbxYAxisClipChangeable.TabStop = false;
    329       this.gbxYAxisClipChangeable.Text = "Y-Axis-Clip changeable";
    330       //
    331343      // flpShowYAxis
    332344      //
     
    339351      this.flpShowYAxis.TabIndex = 0;
    340352      //
    341       // flpYAxisClipChangeable
    342       //
    343       this.flpYAxisClipChangeable.AutoSize = true;
    344       this.flpYAxisClipChangeable.Dock = System.Windows.Forms.DockStyle.Fill;
    345       this.flpYAxisClipChangeable.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
    346       this.flpYAxisClipChangeable.Location = new System.Drawing.Point(3, 16);
    347       this.flpYAxisClipChangeable.Name = "flpYAxisClipChangeable";
    348       this.flpYAxisClipChangeable.Size = new System.Drawing.Size(275, 57);
    349       this.flpYAxisClipChangeable.TabIndex = 0;
     353      // MarkercheckBox
     354      //
     355      this.MarkercheckBox.AutoSize = true;
     356      this.MarkercheckBox.Location = new System.Drawing.Point(142, 106);
     357      this.MarkercheckBox.Name = "MarkercheckBox";
     358      this.MarkercheckBox.Size = new System.Drawing.Size(59, 17);
     359      this.MarkercheckBox.TabIndex = 9;
     360      this.MarkercheckBox.Text = "Marker";
     361      this.MarkercheckBox.UseVisualStyleBackColor = true;
     362      this.MarkercheckBox.CheckedChanged += new System.EventHandler(this.MarkercheckBox_CheckedChanged);
    350363      //
    351364      // OptionsDialog
     
    373386      this.tpYAxes.ResumeLayout(false);
    374387      this.tpYAxes.PerformLayout();
     388      this.gbxYAxisClipChangeable.ResumeLayout(false);
     389      this.gbxYAxisClipChangeable.PerformLayout();
    375390      this.gbxShowYAxis.ResumeLayout(false);
    376391      this.gbxShowYAxis.PerformLayout();
    377       this.gbxYAxisClipChangeable.ResumeLayout(false);
    378       this.gbxYAxisClipChangeable.PerformLayout();
    379392      this.ResumeLayout(false);
    380393
     
    411424    private System.Windows.Forms.FlowLayoutPanel flpYAxisClipChangeable;
    412425    private System.Windows.Forms.FlowLayoutPanel flpShowYAxis;
     426    private System.Windows.Forms.CheckBox MarkercheckBox;
    413427  }
    414428}
  • trunk/sources/HeuristicLab.Visualization/3.2/Options/OptionsDialog.cs

    r1459 r1561  
    1717      string Label { get; set; }
    1818      Color Color { get; set; }
     19      bool ShowMarkers { get; set; }
    1920      int Thickness { get; set; }
    2021      DrawingStyle Style { get; set; }
     
    2728        Style = row.Style;
    2829        this.row = row;
     30        this.ShowMarkers = row.ShowMarkers;
    2931      }
    3032
     
    3436        row.Thickness = Thickness;
    3537        row.Style = Style;
     38        row.ShowMarkers = this.ShowMarkers;
    3639      }
    3740    }
     
    8386        LinestyleCB.SelectedItem = model.Rows[0].Style;
    8487        LineThicknessCB.SelectedItem = model.Rows[0].Thickness;
     88        MarkercheckBox.Checked = model.Rows[0].ShowMarkers;
    8589
    8690        LineSelectCB.DataSource = model.Rows;
     
    128132        LineThicknessCB.SelectedItem = ((IDataRow) LineSelectCB.SelectedValue).Thickness;
    129133        LinestyleCB.SelectedItem = ((IDataRow)LineSelectCB.SelectedValue).Style;
    130         ColorPreviewTB.BackColor = ((IDataRow)LineSelectCB.SelectedValue).Color;   
     134        ColorPreviewTB.BackColor = ((IDataRow)LineSelectCB.SelectedValue).Color;
     135        MarkercheckBox.Checked = ((IDataRow) LineSelectCB.SelectedValue).ShowMarkers;
    131136      }
    132137    }
     
    218223        ((IDataRow)LineSelectCB.SelectedValue).Thickness = (int)LineThicknessCB.SelectedItem;
    219224    }
     225
     226    private void MarkercheckBox_CheckedChanged(object sender, EventArgs e) {
     227      if (LineSelectCB.SelectedValue != null)
     228        ((IDataRow) LineSelectCB.SelectedValue).ShowMarkers = MarkercheckBox.Checked;
     229    }
     230
     231
    220232  }
    221233}
Note: See TracChangeset for help on using the changeset viewer.