Changeset 6012 for branches/histogram/HeuristicLab.Analysis.Views/3.3/DataRowVisualPropertiesControl.cs
- Timestamp:
- 04/15/11 18:41:13 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/histogram/HeuristicLab.Analysis.Views/3.3/DataRowVisualPropertiesControl.cs
r6011 r6012 44 44 InitializeComponent(); 45 45 chartTypeComboBox.DataSource = Enum.GetValues(typeof(DataRowVisualProperties.DataRowChartType)); 46 lineStyleComboBox.DataSource = Enum.GetValues(typeof(DataRowVisualProperties.DataRowLineStyle)); 46 47 } 47 48 … … 52 53 chartTypeComboBox.SelectedIndex = -1; 53 54 colorButton.BackColor = SystemColors.Control; 54 secondYAxisCheckBox.Checked = false; 55 secondXAxisCheckBox.Checked = false; 55 colorButton.Text = "?"; 56 yAxisPrimaryRadioButton.Checked = false; 57 yAxisSecondaryRadioButton.Checked = false; 58 xAxisPrimaryRadioButton.Checked = false; 59 xAxisSecondaryRadioButton.Checked = false; 60 lineStyleComboBox.SelectedIndex = -1; 56 61 startIndexZeroCheckBox.Checked = false; 62 lineWidthNumericUpDown.Value = 1; 57 63 binsNumericUpDown.Value = 1; 58 exactBinsCheckBox.Checked = false; 64 binsApproximatelyRadioButton.Checked = false; 65 binsExactRadioButton.Checked = false; 59 66 } else { 60 67 chartTypeComboBox.SelectedItem = Content.ChartType; … … 62 69 colorButton.BackColor = SystemColors.Control; 63 70 colorButton.Text = "?"; 64 } else colorButton.BackColor = Content.Color; 65 secondYAxisCheckBox.Checked = Content.SecondYAxis; 66 secondXAxisCheckBox.Checked = Content.SecondXAxis; 71 } else { 72 colorButton.BackColor = Content.Color; 73 colorButton.Text = String.Empty; 74 } 75 yAxisPrimaryRadioButton.Checked = !Content.SecondYAxis; 76 yAxisSecondaryRadioButton.Checked = Content.SecondYAxis; 77 xAxisPrimaryRadioButton.Checked = !Content.SecondXAxis; 78 xAxisSecondaryRadioButton.Checked = Content.SecondXAxis; 79 lineStyleComboBox.SelectedItem = Content.LineStyle; 67 80 startIndexZeroCheckBox.Checked = Content.StartIndexZero; 81 lineWidthNumericUpDown.Value = Content.LineWidth; 68 82 binsNumericUpDown.Value = Content.Bins; 69 exactBinsCheckBox.Checked = Content.ExactBins; 83 binsApproximatelyRadioButton.Checked = !Content.ExactBins; 84 binsExactRadioButton.Checked = Content.ExactBins; 70 85 } 71 86 } finally { SuppressEvents = false; } … … 75 90 protected virtual void SetEnabledStateOfControls() { 76 91 commonGroupBox.Enabled = Content != null; 92 lineChartGroupBox.Enabled = Content != null && Content.ChartType == DataRowVisualProperties.DataRowChartType.Line; 77 93 histoGramGroupBox.Enabled = Content != null && Content.ChartType == DataRowVisualProperties.DataRowChartType.Histogram; 78 94 } … … 94 110 } 95 111 96 private void secondYAxisCheckBox_CheckedChanged(object sender, EventArgs e) {112 private void yAxisRadioButton_CheckedChanged(object sender, EventArgs e) { 97 113 if (!SuppressEvents && Content != null) { 98 Content.SecondYAxis = secondYAxisCheckBox.Checked; 114 SuppressEvents = true; 115 try { 116 if (sender == yAxisPrimaryRadioButton) 117 yAxisSecondaryRadioButton.Checked = !yAxisPrimaryRadioButton.Checked; 118 else yAxisPrimaryRadioButton.Checked = !yAxisSecondaryRadioButton.Checked; 119 Content.SecondYAxis = yAxisSecondaryRadioButton.Checked; 120 } finally { SuppressEvents = false; } 99 121 } 100 122 } 101 123 102 private void secondXAxisCheckBox_CheckedChanged(object sender, EventArgs e) {124 private void xAxisRadioButton_CheckedChanged(object sender, EventArgs e) { 103 125 if (!SuppressEvents && Content != null) { 104 Content.SecondXAxis = secondXAxisCheckBox.Checked; 126 SuppressEvents = true; 127 try { 128 if (sender == xAxisPrimaryRadioButton) 129 xAxisSecondaryRadioButton.Checked = !xAxisPrimaryRadioButton.Checked; 130 else xAxisPrimaryRadioButton.Checked = !xAxisSecondaryRadioButton.Checked; 131 Content.SecondXAxis = xAxisSecondaryRadioButton.Checked; 132 } finally { SuppressEvents = false; } 133 } 134 } 135 136 private void lineStyleComboBox_SelectedValueChanged(object sender, EventArgs e) { 137 if (!SuppressEvents && Content != null) { 138 Content.LineStyle = (DataRowVisualProperties.DataRowLineStyle)lineStyleComboBox.SelectedValue; 105 139 } 106 140 } … … 112 146 } 113 147 148 private void lineWidthNumericUpDown_ValueChanged(object sender, EventArgs e) { 149 if (!SuppressEvents && Content != null) { 150 Content.LineWidth = (int)lineWidthNumericUpDown.Value; 151 } 152 } 153 114 154 private void binsNumericUpDown_ValueChanged(object sender, EventArgs e) { 115 155 if (!SuppressEvents && Content != null) { … … 118 158 } 119 159 120 private void exactBinsCheckBox_CheckedChanged(object sender, EventArgs e) {160 private void binNumberRadioButton_CheckedChanged(object sender, EventArgs e) { 121 161 if (!SuppressEvents && Content != null) { 122 Content.ExactBins = exactBinsCheckBox.Checked; 162 SuppressEvents = true; 163 try { 164 if (sender == binsApproximatelyRadioButton) 165 binsExactRadioButton.Checked = !binsApproximatelyRadioButton.Checked; 166 else binsApproximatelyRadioButton.Checked = !binsExactRadioButton.Checked; 167 Content.ExactBins = binsExactRadioButton.Checked; 168 } finally { SuppressEvents = false; } 123 169 } 124 170 }
Note: See TracChangeset
for help on using the changeset viewer.