Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/01/21 13:40:55 (3 years ago)
Author:
chaider
Message:

#3140

  • some more refactoring
  • added possibility to set value of num nodes in infix parser
  • changed displaying style of number
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/TreeEditDialogs/SymbolicExpressionTreeNodeInsertDialog.cs

    r17180 r18100  
    5757      var combo = (ComboBox)sender;
    5858      var symbol = combo.Items[combo.SelectedIndex];
    59       if (symbol is Constant) {
     59      if (symbol is Number) {
    6060        // add controls to the dialog for changing the constant value
    6161        variableNameLabel.Visible = false;
     
    6363        variableWeightLabel.Visible = false;
    6464        variableWeightTextBox.Visible = false;
    65         constantValueLabel.Visible = true;
    66         constantValueTextBox.Visible = true;
     65        numberValueLabel.Visible = true;
     66        numberValueTextBox.Visible = true;
    6767      } else if (symbol is VariableBase) {
    6868        var variableSymbol = (VariableBase)symbol;
     
    8080        variableWeightLabel.Visible = true;
    8181        variableWeightTextBox.Visible = true;
    82         constantValueLabel.Visible = false;
    83         constantValueTextBox.Visible = false;
     82        numberValueLabel.Visible = false;
     83        numberValueTextBox.Visible = false;
    8484        // add controls to the dialog for changing the variable name or weight
    8585      } else {
     
    8888        variableWeightLabel.Visible = false;
    8989        variableWeightTextBox.Visible = false;
    90         constantValueLabel.Visible = false;
    91         constantValueTextBox.Visible = false;
     90        numberValueLabel.Visible = false;
     91        numberValueTextBox.Visible = false;
    9292      }
    9393    }
     
    102102    }
    103103
    104     private void constantValueTextBox_Validating(object sender, CancelEventArgs e) {
     104    private void numberValueTextBox_Validating(object sender, CancelEventArgs e) {
    105105      string errorMessage;
    106       if (ValidateDoubleValue(constantValueTextBox.Text, out errorMessage)) return;
     106      if (ValidateDoubleValue(numberValueTextBox.Text, out errorMessage)) return;
    107107      e.Cancel = true;
    108       errorProvider.SetError(constantValueTextBox, errorMessage);
    109       constantValueTextBox.SelectAll();
     108      errorProvider.SetError(numberValueTextBox, errorMessage);
     109      numberValueTextBox.SelectAll();
    110110    }
    111111
Note: See TracChangeset for help on using the changeset viewer.