using System.Drawing; using System.Linq; using System.Windows.Forms; using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views; using HeuristicLab.EvolutionTracking; using HeuristicLab.EvolutionTracking.Views; using HeuristicLab.MainForm; using HeuristicLab.MainForm.WindowsForms; namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Views { [View("GenealogyGraphView")] [Content(typeof(GenealogyGraph), IsDefaultView = false)] public class SymbolicDataAnalysisGenealogyGraphView : GenealogyGraphView { public override void graphChart_GenealogyGraphNodeClicked(object sender, MouseEventArgs args) { base.graphChart_GenealogyGraphNodeClicked(sender, args); var visualNode = (VisualGenealogyGraphNode)sender; var graphNode = (IGenealogyGraphNode)visualNode.Data; IFragment fragment = null; if (graphNode.InArcs != null) fragment = (IFragment)graphNode.InArcs.Last().Data; if (fragment != null) { var treeView = (GraphicalSymbolicExpressionTreeView)viewHost.ActiveView; treeView.HighlightSubtree(fragment.Root, Color.RoyalBlue); } } } }