- Timestamp:
- 01/18/17 13:17:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Analysis.Views/3.3/DataRowVisualPropertiesControl.cs
r14437 r14582 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 aggregationComboBox.DataSource = Enum.GetValues(typeof(DataRowVisualProperties.DataRowHistogramAggregation)); 49 clearColorButton.BackColor = Color.Transparent; 50 clearColorButton.BackgroundImage = VSImageLibrary.Delete; 47 51 SetEnabledStateOfControls(); 48 52 } … … 65 69 binsApproximatelyRadioButton.Checked = false; 66 70 binsExactRadioButton.Checked = false; 71 aggregationComboBox.SelectedIndex = -1; 67 72 displayNameTextBox.Text = String.Empty; 68 73 } else { … … 93 98 binsApproximatelyRadioButton.Checked = !Content.ExactBins; 94 99 binsExactRadioButton.Checked = Content.ExactBins; 100 aggregationComboBox.SelectedItem = Content.Aggregation; 95 101 displayNameTextBox.Text = Content.DisplayName; 96 102 isVisibleInLegendCheckBox.Checked = Content.IsVisibleInLegend; … … 102 108 protected virtual void SetEnabledStateOfControls() { 103 109 commonGroupBox.Enabled = Content != null; 110 clearColorButton.Visible = Content != null && !Content.Color.IsEmpty; 104 111 lineChartGroupBox.Enabled = Content != null && Content.ChartType == DataRowVisualProperties.DataRowChartType.Line; 105 112 histoGramGroupBox.Enabled = Content != null && Content.ChartType == DataRowVisualProperties.DataRowChartType.Histogram; … … 128 135 colorButton.BackColor = Content.Color; 129 136 colorButton.Text = String.Empty; 137 clearColorButton.Visible = true; 138 } 139 } 140 141 private void clearColorButton_Click(object sender, EventArgs e) { 142 if (!SuppressEvents && Content != null) { 143 SuppressEvents = true; 144 try { 145 Content.Color = Color.Empty; 146 colorButton.BackColor = SystemColors.Control; 147 colorButton.Text = "?"; 148 clearColorButton.Visible = false; 149 } finally { SuppressEvents = false; } 130 150 } 131 151 } … … 178 198 try { 179 199 Content.ExactBins = binsExactRadioButton.Checked; 200 } finally { SuppressEvents = false; } 201 } 202 } 203 204 private void aggregationComboBox_SelectedValueChanged(object sender, EventArgs e) { 205 if (!SuppressEvents && Content != null) { 206 SuppressEvents = true; 207 try { 208 Content.Aggregation = (DataRowVisualProperties.DataRowHistogramAggregation)aggregationComboBox.SelectedValue; 180 209 } finally { SuppressEvents = false; } 181 210 }
Note: See TracChangeset
for help on using the changeset viewer.