- Timestamp:
- 06/30/17 16:41:06 (7 years ago)
- Location:
- stable
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 14435-14439,14457-14458,14493,14508,14516,14519,14582,14740,14860-14861,14982,14984,14987,14992,15042,15068,15095
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Analysis.Views
-
stable/HeuristicLab.Analysis.Views/3.3/DataRowVisualPropertiesControl.cs
r14186 r15097 23 23 using System.Drawing; 24 24 using System.Windows.Forms; 25 using HeuristicLab.Common.Resources; 25 26 using HeuristicLab.MainForm; 26 27 using HeuristicLab.MainForm.WindowsForms; … … 45 46 chartTypeComboBox.DataSource = Enum.GetValues(typeof(DataRowVisualProperties.DataRowChartType)); 46 47 lineStyleComboBox.DataSource = Enum.GetValues(typeof(DataRowVisualProperties.DataRowLineStyle)); 48 clearColorButton.BackColor = Color.Transparent; 49 clearColorButton.BackgroundImage = VSImageLibrary.Delete; 47 50 SetEnabledStateOfControls(); 48 51 } … … 62 65 startIndexZeroCheckBox.Checked = false; 63 66 lineWidthNumericUpDown.Value = 1; 64 binsNumericUpDown.Value = 1;65 binsApproximatelyRadioButton.Checked = false;66 binsExactRadioButton.Checked = false;67 67 displayNameTextBox.Text = String.Empty; 68 68 } else { … … 86 86 lineWidthNumericUpDown.Value = lineWidthNumericUpDown.Maximum; 87 87 else lineWidthNumericUpDown.Value = Content.LineWidth; 88 if (Content.Bins < binsNumericUpDown.Minimum)89 binsNumericUpDown.Value = binsNumericUpDown.Minimum;90 else if (Content.Bins > binsNumericUpDown.Maximum)91 binsNumericUpDown.Value = binsNumericUpDown.Maximum;92 else binsNumericUpDown.Value = Content.Bins;93 binsApproximatelyRadioButton.Checked = !Content.ExactBins;94 binsExactRadioButton.Checked = Content.ExactBins;95 88 displayNameTextBox.Text = Content.DisplayName; 89 isVisibleInLegendCheckBox.Checked = Content.IsVisibleInLegend; 96 90 } 97 91 } finally { SuppressEvents = false; } … … 101 95 protected virtual void SetEnabledStateOfControls() { 102 96 commonGroupBox.Enabled = Content != null; 97 clearColorButton.Visible = Content != null && !Content.Color.IsEmpty; 103 98 lineChartGroupBox.Enabled = Content != null && Content.ChartType == DataRowVisualProperties.DataRowChartType.Line; 104 histoGramGroupBox.Enabled = Content != null && Content.ChartType == DataRowVisualProperties.DataRowChartType.Histogram;99 isVisibleInLegendCheckBox.Enabled = Content != null; 105 100 } 106 101 … … 126 121 colorButton.BackColor = Content.Color; 127 122 colorButton.Text = String.Empty; 123 clearColorButton.Visible = true; 124 } 125 } 126 127 private void clearColorButton_Click(object sender, EventArgs e) { 128 if (!SuppressEvents && Content != null) { 129 SuppressEvents = true; 130 try { 131 Content.Color = Color.Empty; 132 colorButton.BackColor = SystemColors.Control; 133 colorButton.Text = "?"; 134 clearColorButton.Visible = false; 135 } finally { SuppressEvents = false; } 128 136 } 129 137 } … … 165 173 } 166 174 167 private void binsNumericUpDown_ValueChanged(object sender, EventArgs e) {168 if (!SuppressEvents && Content != null) {169 Content.Bins = (int)binsNumericUpDown.Value;170 }171 }172 173 private void binNumberRadioButton_CheckedChanged(object sender, EventArgs e) {174 if (!SuppressEvents && Content != null) {175 SuppressEvents = true;176 try {177 Content.ExactBins = binsExactRadioButton.Checked;178 } finally { SuppressEvents = false; }179 }180 }181 182 175 private void displayNameTextBox_Validated(object sender, EventArgs e) { 183 176 if (!SuppressEvents && Content != null) { … … 188 181 } 189 182 } 183 184 private void isVisibleInLegendCheckBox_CheckedChanged(object sender, EventArgs e) { 185 if (!SuppressEvents && Content != null) { 186 Content.IsVisibleInLegend = isVisibleInLegendCheckBox.Checked; 187 } 188 } 190 189 #endregion 191 190 }
Note: See TracChangeset
for help on using the changeset viewer.