Changeset 15131 for stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/VariableView.cs
- Timestamp:
- 07/06/17 10:19:37 (7 years ago)
- Location:
- stable
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Views
- Property svn:mergeinfo changed
/branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.Views (added) merged: 14232,14237-14238,14243,14251,14277,14449,14497-14499,14591-14592,14751,14759
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/VariableView.cs
r14186 r15131 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.