Changeset 14759 for branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/VariableView.cs
- Timestamp:
- 03/18/17 10:54:13 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/Symbols/VariableView.cs
r14251 r14759 100 100 multiplicativeWeightChangeSigmaTextBox.Enabled = Content != null; 101 101 multiplicativeWeightChangeSigmaTextBox.ReadOnly = ReadOnly; 102 varChangeProbTextBox.Enabled = Content != null; 103 varChangeProbTextBox.ReadOnly = ReadOnly; 102 104 } 103 105 … … 174 176 } 175 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 } 176 188 #endregion 177 189 … … 183 195 additiveWeightChangeSigmaTextBox.Text = string.Empty; 184 196 multiplicativeWeightChangeSigmaTextBox.Text = string.Empty; 197 varChangeProbTextBox.Text = string.Empty; 185 198 // temporarily deregister to prevent circular calling of events 186 199 DeregisterVariableNamesViewContentEvents(); … … 200 213 additiveWeightChangeSigmaTextBox.Text = Content.WeightManipulatorSigma.ToString(); 201 214 multiplicativeWeightChangeSigmaTextBox.Text = Content.MultiplicativeWeightManipulatorSigma.ToString(); 215 varChangeProbTextBox.Text = Content.VariableChangeProbability.ToString(); 202 216 } 203 217 SetEnabledStateOfControls(); 204 218 } 205 219 #endregion 220 206 221 } 207 222 }
Note: See TracChangeset
for help on using the changeset viewer.