Free cookie consent management tool by TermsFeed Policy Generator

Changeset 10521


Ignore:
Timestamp:
02/28/14 12:48:01 (11 years ago)
Author:
bburlacu
Message:

#2076: Fixed build error due to incomplete commit (previous commit).

Location:
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs

    r10492 r10521  
    9797
    9898    private void treeChart_SymbolicExpressionTreeNodeDoubleClicked(object sender, MouseEventArgs e) {
    99       var visualNode = (VisualSymbolicExpressionTreeNode)sender;
    100       var symbExprTreeNode = (SymbolicExpressionTreeNode)visualNode.SymbolicExpressionTreeNode;
     99      var visualNode = (VisualTreeNode<ISymbolicExpressionTreeNode>)sender;
     100      var symbExprTreeNode = (SymbolicExpressionTreeNode)visualNode.Content;
    101101      if (symbExprTreeNode == null) return;
    102102      var tree = Content.Model.SymbolicExpressionTree;
     
    126126      double max = impacts.Max();
    127127      double min = impacts.Min();
    128       foreach (ISymbolicExpressionTreeNode treeNode in Content.Model.SymbolicExpressionTree.IterateNodesPostfix()) {
    129         VisualSymbolicExpressionTreeNode visualTree = treeChart.GetVisualSymbolicExpressionTreeNode(treeNode);
     128      foreach (var treeNode in Content.Model.SymbolicExpressionTree.IterateNodesPostfix()) {
     129        VisualTreeNode<ISymbolicExpressionTreeNode> visualTree = treeChart.GetVisualSymbolicExpressionTreeNode(treeNode);
    130130
    131131        if (!(treeNode is ConstantTreeNode) && nodeImpacts.ContainsKey(treeNode)) {
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicExpressionTreeChart.cs

    r9456 r10521  
    3333  internal sealed partial class InteractiveSymbolicExpressionTreeChart : SymbolicExpressionTreeChart {
    3434    private ISymbolicExpressionTreeNode tempNode; // node in clipboard (to be cut/copy/pasted etc)
    35     private VisualSymbolicExpressionTreeNode currSelected; // currently selected node
     35    private VisualTreeNode<ISymbolicExpressionTreeNode> currSelected; // currently selected node
    3636    private enum EditOp { NoOp, CopySubtree, CutSubtree }
    3737    private EditOp lastOp = EditOp.NoOp;
     
    6565        pasteToolStripMenuItem.Visible = false;
    6666      } else {
    67         var node = currSelected.SymbolicExpressionTreeNode;
     67        var node = currSelected.Content;
    6868        insertNodeToolStripMenuItem.Visible = true;
    6969        changeNodeToolStripMenuItem.Visible = true;
     
    7777        pasteToolStripMenuItem.Enabled = tempNode != null && insertNodeToolStripMenuItem.Enabled
    7878                                                          && !(lastOp == EditOp.CutSubtree
    79                                                                && tempNode.IterateNodesBreadth().Contains(currSelected.SymbolicExpressionTreeNode));
     79                                                               && tempNode.IterateNodesBreadth().Contains(currSelected.Content));
    8080      }
    8181    }
    8282
    8383    protected override void OnSymbolicExpressionTreeNodeClicked(object sender, MouseEventArgs e) {
    84       currSelected = (VisualSymbolicExpressionTreeNode)sender; ;
     84      currSelected = (VisualTreeNode<ISymbolicExpressionTreeNode>)sender; ;
    8585      if (currSelected != null) {
    8686        currSelected.LineColor = Color.FromArgb(130, currSelected.LineColor);
     
    104104
    105105    private void insertNodeToolStripMenuItem_Click(object sender, EventArgs e) {
    106       if (currSelected == null || currSelected.SymbolicExpressionTreeNode is SymbolicExpressionTreeTerminalNode) return;
    107       var parent = currSelected.SymbolicExpressionTreeNode;
     106      if (currSelected == null || currSelected.Content is SymbolicExpressionTreeTerminalNode) return;
     107      var parent = currSelected.Content;
    108108
    109109      using (var dialog = new InsertNodeDialog()) {
     
    138138      if (currSelected == null) return;
    139139
    140       var node = (ISymbolicExpressionTreeNode)currSelected.SymbolicExpressionTreeNode.Clone();
    141       var originalNode = currSelected.SymbolicExpressionTreeNode;
     140      var node = (ISymbolicExpressionTreeNode)currSelected.Content.Clone();
     141      var originalNode = currSelected.Content;
    142142
    143143      ISymbolicExpressionTreeNode newNode = null;
     
    180180        }
    181181      }
    182       tempNode = currSelected.SymbolicExpressionTreeNode;
     182      tempNode = currSelected.Content;
    183183      foreach (var node in tempNode.IterateNodesPostfix()) {
    184184        var visualNode = GetVisualSymbolicExpressionTreeNode(node);
     
    194194    }
    195195    private void removeNodeToolStripMenuItem_Click(object sender, EventArgs e) {
    196       var node = currSelected.SymbolicExpressionTreeNode;
     196      var node = currSelected.Content;
    197197      if (node == tempNode) tempNode = null;
    198198      ModifyTree(Tree, node.Parent, node, null, removeSubtree: false);
     
    200200    }
    201201    private void removeSubtreeToolStripMenuItem_Click(object sender, EventArgs e) {
    202       var node = currSelected.SymbolicExpressionTreeNode;
     202      var node = currSelected.Content;
    203203      if (node.IterateNodesPostfix().Contains(tempNode)) tempNode = null;
    204204      ModifyTree(Tree, node.Parent, node, null, removeSubtree: true);
     
    209209      if (!(lastOp == EditOp.CopySubtree || lastOp == EditOp.CutSubtree)) return;
    210210      // check if the copied/cut node (stored in the tempNode) can be inserted as a child of the current selected node
    211       var node = currSelected.SymbolicExpressionTreeNode;
     211      var node = currSelected.Content;
    212212      if (node is ConstantTreeNode || node is VariableTreeNode) return;
    213213      // check if the currently selected node can accept the copied node as a child
Note: See TracChangeset for help on using the changeset viewer.