Changeset 17896 for branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/ShapeConstraintView.cs
- Timestamp:
- 03/16/21 11:08:18 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3073_IA_constraint_splitting_reintegration/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/ShapeConstraintView.cs
r17895 r17896 2 2 3 3 /* HeuristicLab 4 * Copyright (C) 2002-2019Heuristic and Evolutionary Algorithms Laboratory (HEAL)4 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL) 5 5 * 6 6 * This file is part of HeuristicLab. … … 29 29 30 30 namespace HeuristicLab.Problems.DataAnalysis.Views { 31 [View(" Interval Constraint DetailView")]31 [View("Shape Constraint View")] 32 32 [Content(typeof(ShapeConstraint), true)] 33 public sealed partial class IntervalConstraintView : ItemView {33 public sealed partial class ShapeConstraintView : ItemView { 34 34 public new ShapeConstraint Content { 35 35 get => (ShapeConstraint)base.Content; … … 37 37 } 38 38 39 public IntervalConstraintView() {39 public ShapeConstraintView() { 40 40 InitializeComponent(); 41 41 int[] items = { 1, 2, 3 }; 42 number derivationInput.DataSource = items;42 numberOfDerivationsComboBox.DataSource = items; 43 43 } 44 44 … … 62 62 base.SetEnabledStateOfControls(); 63 63 variableInput.Enabled = Content != null && !Locked && !ReadOnly; 64 number derivationInput.Enabled = Content != null && !Locked && !ReadOnly;64 numberOfDerivationsComboBox.Enabled = Content != null && !Locked && !ReadOnly; 65 65 lowerboundInput.Enabled = Content != null && !Locked && !ReadOnly; 66 66 upperboundInput.Enabled = Content != null && !Locked && !ReadOnly; 67 weight Input.Enabled = Content != null && !Locked && !ReadOnly;67 weightTextBox.Enabled = Content != null && !Locked && !ReadOnly; 68 68 } 69 69 … … 96 96 lowerboundInput.Text = string.Empty; 97 97 upperboundInput.Text = string.Empty; 98 weight Input.Text = string.Empty;98 weightTextBox.Text = string.Empty; 99 99 return; 100 100 } … … 102 102 lowerboundInput.Text = Content.Interval.LowerBound.ToString(); 103 103 upperboundInput.Text = Content.Interval.UpperBound.ToString(); 104 weight Input.Text = Content.Weight.ToString();104 weightTextBox.Text = Content.Weight.ToString(); 105 105 106 106 variableInput.Text = Content.Variable; 107 107 if (!Content.IsDerivative) { 108 number derivationInput.Enabled = false;109 number derivationInput.SelectedItem = null;110 number derivationInput.Text = "0";108 numberOfDerivationsComboBox.Enabled = false; 109 numberOfDerivationsComboBox.SelectedItem = null; 110 numberOfDerivationsComboBox.Text = "0"; 111 111 } else { 112 number derivationLabel.Visible = true;113 number derivationInput.Visible = true;114 number derivationInput.Enabled = true;115 number derivationInput.SelectedItem = Content.NumberOfDerivations;112 numberOfDerivationLabel.Visible = true; 113 numberOfDerivationsComboBox.Visible = true; 114 numberOfDerivationsComboBox.Enabled = true; 115 numberOfDerivationsComboBox.SelectedItem = Content.NumberOfDerivations; 116 116 } 117 117 … … 172 172 173 173 private void numberderivationInput_SelectedIndexChanged(object sender, EventArgs e) { 174 if (number derivationInput.SelectedItem == null) {174 if (numberOfDerivationsComboBox.SelectedItem == null) { 175 175 Content.NumberOfDerivations = 0; 176 number derivationInput.Enabled = false;177 return; 178 } 179 180 if ((int)number derivationInput.SelectedItem == 1)176 numberOfDerivationsComboBox.Enabled = false; 177 return; 178 } 179 180 if ((int)numberOfDerivationsComboBox.SelectedItem == 1) 181 181 Content.NumberOfDerivations = 1; 182 else if ((int)number derivationInput.SelectedItem == 2)182 else if ((int)numberOfDerivationsComboBox.SelectedItem == 2) 183 183 Content.NumberOfDerivations = 2; 184 else if ((int)number derivationInput.SelectedItem == 3)184 else if ((int)numberOfDerivationsComboBox.SelectedItem == 3) 185 185 Content.NumberOfDerivations = 3; 186 186 } 187 187 188 188 private void weightInput_TextChanged(object sender, EventArgs e) { 189 var value = ParseDoubleValue(weight Input.Text, weightInput, errorProvider);189 var value = ParseDoubleValue(weightTextBox.Text, weightTextBox, errorProvider); 190 190 if (!double.IsNaN(value)) Content.Weight = value; 191 191 }
Note: See TracChangeset
for help on using the changeset viewer.