Changeset 14600 for branches/PerformanceComparison/HeuristicLab.Analysis.Views/3.3/DataRowVisualPropertiesControl.cs
- Timestamp:
- 01/23/17 16:11:02 (7 years ago)
- Location:
- branches/PerformanceComparison/HeuristicLab.Analysis.Views
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PerformanceComparison/HeuristicLab.Analysis.Views
-
branches/PerformanceComparison/HeuristicLab.Analysis.Views/3.3/DataRowVisualPropertiesControl.cs
r12012 r14600 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 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; 102 isVisibleInLegendCheckBox.Checked = Content.IsVisibleInLegend; 96 103 } 97 104 } finally { SuppressEvents = false; } … … 101 108 protected virtual void SetEnabledStateOfControls() { 102 109 commonGroupBox.Enabled = Content != null; 110 clearColorButton.Visible = Content != null && !Content.Color.IsEmpty; 103 111 lineChartGroupBox.Enabled = Content != null && Content.ChartType == DataRowVisualProperties.DataRowChartType.Line; 104 112 histoGramGroupBox.Enabled = Content != null && Content.ChartType == DataRowVisualProperties.DataRowChartType.Histogram; 113 isVisibleInLegendCheckBox.Enabled = Content != null; 105 114 } 106 115 … … 126 135 colorButton.BackColor = Content.Color; 127 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; } 128 150 } 129 151 } … … 180 202 } 181 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; 209 } finally { SuppressEvents = false; } 210 } 211 } 212 182 213 private void displayNameTextBox_Validated(object sender, EventArgs e) { 183 214 if (!SuppressEvents && Content != null) { … … 186 217 Content.DisplayName = displayNameTextBox.Text; 187 218 } finally { SuppressEvents = false; } 219 } 220 } 221 222 private void isVisibleInLegendCheckBox_CheckedChanged(object sender, EventArgs e) { 223 if (!SuppressEvents && Content != null) { 224 Content.IsVisibleInLegend = isVisibleInLegendCheckBox.Checked; 188 225 } 189 226 }
Note: See TracChangeset
for help on using the changeset viewer.