Changeset 16692 for branches/2521_ProblemRefactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/VariableView.cs
- Timestamp:
- 03/18/19 17:24:30 (6 years ago)
- Location:
- branches/2521_ProblemRefactoring
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring
- Property svn:ignore
-
old new 24 24 protoc.exe 25 25 obj 26 .vs
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/2521_ProblemRefactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Views
- Property svn:mergeinfo changed
-
branches/2521_ProblemRefactoring/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/VariableView.cs
r12012 r16692 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 29 29 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views; 30 30 using HeuristicLab.MainForm; 31 using HeuristicLab.MainForm.WindowsForms;32 31 33 32 34 33 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views { 35 34 [View("Variable View")] 36 [Content(typeof(Variable ), true)]35 [Content(typeof(VariableBase), true)] 37 36 public partial class VariableView : SymbolView { 38 37 private CheckedItemCollectionView<StringValue> variableNamesView; 39 38 40 public new Variable Content {41 get { return (Variable )base.Content; }39 public new VariableBase Content { 40 get { return (VariableBase)base.Content; } 42 41 set { base.Content = value; } 43 42 } … … 101 100 multiplicativeWeightChangeSigmaTextBox.Enabled = Content != null; 102 101 multiplicativeWeightChangeSigmaTextBox.ReadOnly = ReadOnly; 102 varChangeProbTextBox.Enabled = Content != null; 103 varChangeProbTextBox.ReadOnly = ReadOnly; 103 104 } 104 105 … … 175 176 } 176 177 } 178 179 private void VarProbTextBox_TextChanged(object sender, EventArgs e) { 180 double prob; 181 if (double.TryParse(varChangeProbTextBox.Text, out prob) && prob >= 0.0 && prob <= 1.0) { 182 Content.VariableChangeProbability = prob; 183 errorProvider.SetError(varChangeProbTextBox, string.Empty); 184 } else { 185 errorProvider.SetError(varChangeProbTextBox, "Invalid value"); 186 } 187 } 177 188 #endregion 178 189 … … 184 195 additiveWeightChangeSigmaTextBox.Text = string.Empty; 185 196 multiplicativeWeightChangeSigmaTextBox.Text = string.Empty; 197 varChangeProbTextBox.Text = string.Empty; 186 198 // temporarily deregister to prevent circular calling of events 187 199 DeregisterVariableNamesViewContentEvents(); … … 201 213 additiveWeightChangeSigmaTextBox.Text = Content.WeightManipulatorSigma.ToString(); 202 214 multiplicativeWeightChangeSigmaTextBox.Text = Content.MultiplicativeWeightManipulatorSigma.ToString(); 215 varChangeProbTextBox.Text = Content.VariableChangeProbability.ToString(); 203 216 } 204 217 SetEnabledStateOfControls(); 205 218 } 206 219 #endregion 220 207 221 } 208 222 }
Note: See TracChangeset
for help on using the changeset viewer.