Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/01/13 13:01:40 (11 years ago)
Author:
bburlacu
Message:

#1772: Merged remaining trunk changes into the EvolutionaryTracking branch.

Location:
branches/HeuristicLab.EvolutionaryTracking
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionaryTracking

  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/GenealogyGraphView.cs

    r9420 r9835  
    3030using HeuristicLab.MainForm;
    3131using HeuristicLab.Problems.DataAnalysis.Symbolic;
    32 using HeuristicLab.Visualization;
    3332
    3433namespace HeuristicLab.EvolutionaryTracking.Views {
     
    4948      InitializeComponent();
    5049      // set button icons here because if set in the designer file, they get overwritten
    51       this.moveModeButton.Image = Common.Resources.VSImageLibrary.Pointer;
    52       this.zoomModeButton.Image = Common.Resources.VSImageLibrary.Zoom;
    53       this.selectModeButton.Image = Common.Resources.VSImageLibrary.Object;
    5450      this.highlightAllButton.Image = Common.Resources.VSImageLibrary.Gradient;
    5551      this.simpleLineagesCheckBox.Image = Common.Resources.VSImageLibrary.ArrowDown;
     
    111107      var genealogyGraphNode = visualGenealogyGraphNode.Data;
    112108      symbolicExpressionTreeChart.Tree = genealogyGraphNode.SymbolicExpressionTree;
     109
    113110      if (genealogyGraphNode.InEdges == null) return;
    114111      var arc = genealogyGraphNode.InEdges.Last(x => x.Source != x.Target);
     
    121118      }
    122119      symbolicExpressionTreeChart.Repaint();
    123     }
    124 
    125     private void moveModeButton_CheckedChanged(object sender, EventArgs e) {
    126       var btn = (RadioButton)sender;
    127       if (btn.Checked) { genealogyGraphChart.Chart.Mode = ChartMode.Move; }
    128     }
    129 
    130     private void zoomModeButton_CheckedChanged(object sender, EventArgs e) {
    131       var btn = (RadioButton)sender;
    132       if (btn.Checked) { genealogyGraphChart.Chart.Mode = ChartMode.Zoom; }
    133     }
    134 
    135     private void selectModeButton_CheckedChanged(object sender, EventArgs e) {
    136       var btn = (RadioButton)sender;
    137       if (btn.Checked) { genealogyGraphChart.Chart.Mode = ChartMode.Select; }
    138120    }
    139121
     
    191173      genealogyGraphChart.Chart.UpdateEnabled = false;
    192174      genealogyGraphChart.ClearAllNodes(); // clear node colors
    193       var fragment = new Fragment(clonedNodes[selectedVisualSymbExprTreeNode.SymbolicExpressionTreeNode]);
     175      var fragment = new Fragment { Root = clonedNodes[selectedVisualSymbExprTreeNode.SymbolicExpressionTreeNode] };
    194176      var fragmentLength = fragment.Length;
    195177      // highlight nodes
     
    247229      genealogyGraphChart.LockGenealogy = lockGenealogyCheckBox.Checked;
    248230    }
     231
     232    private void highlightRootParentsButton_Click(object sender, EventArgs e) {
     233      var nodes = genealogyGraphChart.Graph.Nodes.Where(n => n.InEdges != null && n.InEdges.Count == 2).Select(n => (SymbolicExpressionGenealogyGraphNode)n.InEdges[0].Source).ToList();
     234      genealogyGraphChart.HighlightNodes(nodes);
     235    }
     236
     237    private void highlightSecondaryParentsButton_Click(object sender, EventArgs e) {
     238      var nodes = genealogyGraphChart.Graph.Nodes.Where(n => n.InEdges != null && n.InEdges.Count == 2).Select(n => (SymbolicExpressionGenealogyGraphNode)n.InEdges[1].Source).ToList();
     239      genealogyGraphChart.HighlightNodes(nodes);
     240    }
    249241  }
    250242}
Note: See TracChangeset for help on using the changeset viewer.