Changeset 18100 for branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TreeEditDialogs/SymbolicExpressionTreeNodeInsertDialog.cs
- Timestamp:
- 12/01/21 13:40:55 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TreeEditDialogs/SymbolicExpressionTreeNodeInsertDialog.cs
r17180 r18100 57 57 var combo = (ComboBox)sender; 58 58 var symbol = combo.Items[combo.SelectedIndex]; 59 if (symbol is Constant) {59 if (symbol is Number) { 60 60 // add controls to the dialog for changing the constant value 61 61 variableNameLabel.Visible = false; … … 63 63 variableWeightLabel.Visible = false; 64 64 variableWeightTextBox.Visible = false; 65 constantValueLabel.Visible = true;66 constantValueTextBox.Visible = true;65 numberValueLabel.Visible = true; 66 numberValueTextBox.Visible = true; 67 67 } else if (symbol is VariableBase) { 68 68 var variableSymbol = (VariableBase)symbol; … … 80 80 variableWeightLabel.Visible = true; 81 81 variableWeightTextBox.Visible = true; 82 constantValueLabel.Visible = false;83 constantValueTextBox.Visible = false;82 numberValueLabel.Visible = false; 83 numberValueTextBox.Visible = false; 84 84 // add controls to the dialog for changing the variable name or weight 85 85 } else { … … 88 88 variableWeightLabel.Visible = false; 89 89 variableWeightTextBox.Visible = false; 90 constantValueLabel.Visible = false;91 constantValueTextBox.Visible = false;90 numberValueLabel.Visible = false; 91 numberValueTextBox.Visible = false; 92 92 } 93 93 } … … 102 102 } 103 103 104 private void constantValueTextBox_Validating(object sender, CancelEventArgs e) {104 private void numberValueTextBox_Validating(object sender, CancelEventArgs e) { 105 105 string errorMessage; 106 if (ValidateDoubleValue( constantValueTextBox.Text, out errorMessage)) return;106 if (ValidateDoubleValue(numberValueTextBox.Text, out errorMessage)) return; 107 107 e.Cancel = true; 108 errorProvider.SetError( constantValueTextBox, errorMessage);109 constantValueTextBox.SelectAll();108 errorProvider.SetError(numberValueTextBox, errorMessage); 109 numberValueTextBox.SelectAll(); 110 110 } 111 111
Note: See TracChangeset
for help on using the changeset viewer.