Changeset 15097 for stable/HeuristicLab.Analysis.Views/3.3/ScatterPlotDataRowVisualPropertiesControl.cs
- 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/ScatterPlotDataRowVisualPropertiesControl.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; … … 44 45 InitializeComponent(); 45 46 pointStyleComboBox.DataSource = Enum.GetValues(typeof(ScatterPlotDataRowVisualProperties.ScatterPlotDataRowPointStyle)); 47 regressionTypeComboBox.DataSource = Enum.GetValues(typeof(ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType)); 48 clearColorButton.BackColor = Color.Transparent; 49 clearColorButton.BackgroundImage = VSImageLibrary.Delete; 46 50 SetEnabledStateOfControls(); 47 51 } … … 57 61 pointSizeNumericUpDown.Value = 1; 58 62 displayNameTextBox.Text = String.Empty; 63 regressionTypeComboBox.SelectedIndex = -1; 64 polynomialRegressionOrderNumericUpDown.Value = 2; 65 isRegressionVisibleInLegendCheckBox.Checked = false; 66 regressionLegendTextBox.Text = string.Empty; 59 67 } else { 60 68 displayNameTextBox.Text = Content.DisplayName; … … 69 77 pointSizeNumericUpDown.Value = Content.PointSize; 70 78 isVisibleInLegendCheckBox.Checked = Content.IsVisibleInLegend; 79 regressionTypeComboBox.SelectedItem = Content.RegressionType; 80 polynomialRegressionOrderNumericUpDown.Value = Content.PolynomialRegressionOrder; 81 isRegressionVisibleInLegendCheckBox.Checked = Content.IsRegressionVisibleInLegend; 82 regressionLegendTextBox.Text = content.RegressionDisplayName; 71 83 } 72 84 } … … 78 90 pointStyleComboBox.Enabled = Content != null; 79 91 colorButton.Enabled = Content != null; 80 c olorButton.Enabled = Content != null;92 clearColorButton.Visible = Content != null && !Content.Color.IsEmpty; 81 93 isVisibleInLegendCheckBox.Enabled = Content != null; 82 94 pointSizeNumericUpDown.Enabled = Content != null; 83 95 displayNameTextBox.Enabled = Content != null; 96 regressionTypeComboBox.Enabled = Content != null; 97 polynomialRegressionOrderNumericUpDown.Enabled = Content != null && Content.RegressionType == ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.Polynomial; 98 orderLabel.Enabled = polynomialRegressionOrderNumericUpDown.Enabled; 99 isRegressionVisibleInLegendCheckBox.Enabled = Content != null && Content.RegressionType != ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.None; 100 regressionLegendTextBox.Enabled = Content != null && Content.RegressionType != ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType.None; 84 101 } 85 102 … … 87 104 private void pointStyleComboBox_SelectedValueChanged(object sender, EventArgs e) { 88 105 if (!SuppressEvents && Content != null) { 89 ScatterPlotDataRowVisualProperties.ScatterPlotDataRowPointStyleselected = (ScatterPlotDataRowVisualProperties.ScatterPlotDataRowPointStyle)pointStyleComboBox.SelectedValue;106 var selected = (ScatterPlotDataRowVisualProperties.ScatterPlotDataRowPointStyle)pointStyleComboBox.SelectedValue; 90 107 Content.PointStyle = selected; 91 108 } … … 97 114 colorButton.BackColor = Content.Color; 98 115 colorButton.Text = String.Empty; 116 clearColorButton.Visible = true; 117 } 118 } 119 120 private void clearColorButton_Click(object sender, EventArgs e) { 121 if (!SuppressEvents && Content != null) { 122 Content.Color = Color.Empty; 123 colorButton.BackColor = SystemColors.Control; 124 colorButton.Text = "?"; 125 clearColorButton.Visible = false; 99 126 } 100 127 } … … 121 148 } 122 149 } 150 151 private void regressionTypeComboBox_SelectedValueChanged(object sender, EventArgs e) { 152 if (!SuppressEvents && Content != null) { 153 var selected = (ScatterPlotDataRowVisualProperties.ScatterPlotDataRowRegressionType)regressionTypeComboBox.SelectedValue; 154 Content.RegressionType = selected; 155 SetEnabledStateOfControls(); 156 } 157 } 158 159 private void polynomialRegressionOrderNumericUpDown_ValueChanged(object sender, EventArgs e) { 160 if (!SuppressEvents && Content != null) { 161 Content.PolynomialRegressionOrder = (int)polynomialRegressionOrderNumericUpDown.Value; 162 } 163 } 164 165 private void isRegressionVisibleInLegendCheckBox_CheckedChanged(object sender, EventArgs e) { 166 if (!SuppressEvents && Content != null) { 167 Content.IsRegressionVisibleInLegend = isRegressionVisibleInLegendCheckBox.Checked; 168 } 169 } 170 171 private void regressionLegendTextBox_Validated(object sender, EventArgs e) { 172 if (!SuppressEvents && Content != null) { 173 Content.RegressionDisplayName = regressionLegendTextBox.Text; 174 } 175 } 123 176 #endregion 124 177 }
Note: See TracChangeset
for help on using the changeset viewer.