Changeset 14600 for branches/PerformanceComparison/HeuristicLab.Analysis.Views/3.3/ScatterPlotDataRowVisualPropertiesControl.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/ScatterPlotDataRowVisualPropertiesControl.cs
r13722 r14600 20 20 #endregion 21 21 22 using HeuristicLab.MainForm;23 22 using System; 24 23 using System.Drawing; 25 24 using System.Windows.Forms; 25 using HeuristicLab.MainForm; 26 using HeuristicLab.MainForm.WindowsForms; 26 27 27 28 namespace HeuristicLab.Analysis.Views { … … 43 44 InitializeComponent(); 44 45 pointStyleComboBox.DataSource = Enum.GetValues(typeof(ScatterPlotDataRowVisualProperties.ScatterPlotDataRowPointStyle)); 46 regressionTypeComboBox.DataSource = Enum.GetValues(typeof(ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType)); 45 47 SetEnabledStateOfControls(); 46 48 } … … 56 58 pointSizeNumericUpDown.Value = 1; 57 59 displayNameTextBox.Text = String.Empty; 58 regressionLineCheckBox.Checked = false; 60 regressionTypeComboBox.SelectedIndex = -1; 61 polynomialRegressionOrderNumericUpDown.Value = 2; 62 isRegressionVisibleInLegendCheckBox.Checked = false; 63 regressionLegendTextBox.Text = string.Empty; 59 64 } else { 60 65 displayNameTextBox.Text = Content.DisplayName; … … 69 74 pointSizeNumericUpDown.Value = Content.PointSize; 70 75 isVisibleInLegendCheckBox.Checked = Content.IsVisibleInLegend; 71 regressionLineCheckBox.Checked = Content.ShowRegressionLine; 76 regressionTypeComboBox.SelectedItem = Content.RegressionType; 77 polynomialRegressionOrderNumericUpDown.Value = Content.PolynomialRegressionOrder; 78 isRegressionVisibleInLegendCheckBox.Checked = Content.IsRegressionVisibleInLegend; 79 regressionLegendTextBox.Text = content.RegressionDisplayName; 72 80 } 73 81 } … … 83 91 pointSizeNumericUpDown.Enabled = Content != null; 84 92 displayNameTextBox.Enabled = Content != null; 85 regressionLineCheckBox.Enabled = Content != null; 93 regressionTypeComboBox.Enabled = Content != null; 94 polynomialRegressionOrderNumericUpDown.Enabled = Content != null && Content.RegressionType == ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.Polynomial; 95 orderLabel.Enabled = polynomialRegressionOrderNumericUpDown.Enabled; 96 isRegressionVisibleInLegendCheckBox.Enabled = Content != null && Content.RegressionType != ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.None; 97 regressionLegendTextBox.Enabled = Content != null && Content.RegressionType != ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.None; 86 98 } 87 99 … … 89 101 private void pointStyleComboBox_SelectedValueChanged(object sender, EventArgs e) { 90 102 if (!SuppressEvents && Content != null) { 91 ScatterPlotDataRowVisualProperties.ScatterPlotDataRowPointStyleselected = (ScatterPlotDataRowVisualProperties.ScatterPlotDataRowPointStyle)pointStyleComboBox.SelectedValue;103 var selected = (ScatterPlotDataRowVisualProperties.ScatterPlotDataRowPointStyle)pointStyleComboBox.SelectedValue; 92 104 Content.PointStyle = selected; 93 105 } … … 124 136 } 125 137 126 private void regression LineCheckBox_CheckedChanged(object sender, EventArgs e) {138 private void regressionTypeComboBox_SelectedValueChanged(object sender, EventArgs e) { 127 139 if (!SuppressEvents && Content != null) { 128 Content.ShowRegressionLine = regressionLineCheckBox.Checked; 140 var selected = (ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType)regressionTypeComboBox.SelectedValue; 141 Content.RegressionType = selected; 142 SetEnabledStateOfControls(); 143 } 144 } 145 146 private void polynomialRegressionOrderNumericUpDown_ValueChanged(object sender, EventArgs e) { 147 if (!SuppressEvents && Content != null) { 148 Content.PolynomialRegressionOrder = (int)polynomialRegressionOrderNumericUpDown.Value; 149 } 150 } 151 152 private void isRegressionVisibleInLegendCheckBox_CheckedChanged(object sender, EventArgs e) { 153 if (!SuppressEvents && Content != null) { 154 Content.IsRegressionVisibleInLegend = isRegressionVisibleInLegendCheckBox.Checked; 155 } 156 } 157 158 private void regressionLegendTextBox_Validated(object sender, EventArgs e) { 159 if (!SuppressEvents && Content != null) { 160 Content.RegressionDisplayName = regressionLegendTextBox.Text; 129 161 } 130 162 }
Note: See TracChangeset
for help on using the changeset viewer.