Changeset 18100 for branches/3140_NumberSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicExpressionTreeChart.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/InteractiveSymbolicExpressionTreeChart.cs
r17180 r18100 104 104 var symbol = dialog.SelectedSymbol; 105 105 var node = symbol.CreateTreeNode(); 106 if (node is ConstantTreeNode) {107 var constant = node as ConstantTreeNode;108 constant.Value = double.Parse(dialog.constantValueTextBox.Text);106 if (node is NumberTreeNode) { 107 var number = node as NumberTreeNode; 108 number.Value = double.Parse(dialog.numberValueTextBox.Text); 109 109 } else if (node is VariableTreeNode) { 110 110 var variable = node as VariableTreeNode; … … 133 133 ISymbolicExpressionTreeNode newNode = null; 134 134 var result = DialogResult.Cancel; 135 if (node is ConstantTreeNode) {136 using (var dialog = new ConstantNodeEditDialog(node)) {135 if (node is NumberTreeNode) { 136 using (var dialog = new NumberNodeEditDialog(node)) { 137 137 dialog.ShowDialog(this); 138 138 newNode = dialog.NewNode; … … 200 200 // check if the copied/cut node (stored in the tempNode) can be inserted as a child of the current selected node 201 201 var node = currSelected.Content; 202 if (node is ConstantTreeNode || node is VariableTreeNode) return;202 if (node is NumberTreeNode || node is VariableTreeNode) return; 203 203 // check if the currently selected node can accept the copied node as a child 204 204 // no need to check the grammar, an arity check will do just fine here
Note: See TracChangeset
for help on using the changeset viewer.