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:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionaryTracking

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

    r9420 r9835  
    8888
    8989    public GenealogyGraphChart() {
     90      //      InitializeComponent();
    9091      Chart = new Chart(0, 0, PreferredSize.Width, PreferredSize.Height);
    9192      x = 0;
    9293      y = PreferredSize.Height + Cx + 2 * Diameter;
     94      Chart.Mode = ChartMode.Select;
    9395    }
    9496
     
    190192
    191193    protected override void pictureBox_MouseMove(object sender, MouseEventArgs e) {
    192       if (!drawing)
     194      if (!drawing) {
     195        switch (e.Button) {
     196          case MouseButtons.Left:
     197            Chart.Mode = ChartMode.Select;
     198            Cursor = Cursors.Default;
     199            break;
     200          case MouseButtons.Middle:
     201            Chart.Mode = ChartMode.Move;
     202            Cursor = Cursors.Hand;
     203            break;
     204        }
    193205        base.pictureBox_MouseMove(sender, e);
     206      }
    194207    }
    195208
    196209    protected override void pictureBox_MouseUp(object sender, MouseEventArgs e) {
     210      Cursor = Cursors.Default;
     211      if (Chart.Mode == ChartMode.Move) {
     212        Chart.Mode = ChartMode.Select;
     213        return;
     214      }
     215
    197216      if (Chart.Mode != ChartMode.Select) {
    198217        base.pictureBox_MouseUp(sender, e);
    199218        return;
    200219      }
     220
    201221      var visualNodes = Chart.GetAllPrimitives(e.Location).Where(p => p is VisualGenealogyGraphNode).ToList();
    202222      if (visualNodes.Count <= 0) {
     
    280300    }
    281301
     302    public void HighlightNodes(IEnumerable<SymbolicExpressionGenealogyGraphNode> nodes) {
     303      Chart.UpdateEnabled = false;
     304      ClearAllNodes();
     305      foreach (var node in nodes) {
     306        GetVisualGenealogyGraphNode(node).Brush = new SolidBrush(node.GetColor());
     307      }
     308      Chart.UpdateEnabled = true;
     309      Chart.EnforceUpdate();
     310    }
     311
    282312    // TODO: optimize and reduce complexity of this method
    283313    public void HighlightNodes(IEnumerable<ISymbolicExpressionTree> trees) {
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/GenealogyGraphView.Designer.cs

    r9420 r9835  
    2929      this.components = new System.ComponentModel.Container();
    3030      this.splitContainer = new System.Windows.Forms.SplitContainer();
    31       this.genealogyGraphChart = new HeuristicLab.EvolutionaryTracking.Views.GenealogyGraphChart();
    3231      this.symbolicExpressionTreeChart = new HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.SymbolicExpressionTreeChart();
    3332      this.topControlBox = new System.Windows.Forms.Panel();
     33      this.graphControlsGroupBox = new System.Windows.Forms.GroupBox();
     34      this.lockGenealogyCheckBox = new System.Windows.Forms.CheckBox();
     35      this.highlightAllButton = new System.Windows.Forms.Button();
     36      this.simpleLineagesCheckBox = new System.Windows.Forms.CheckBox();
    3437      this.groupBox1 = new System.Windows.Forms.GroupBox();
    3538      this.matchConstantsCheckBox = new System.Windows.Forms.CheckBox();
    3639      this.matchVariableWeightsCheckBox = new System.Windows.Forms.CheckBox();
    3740      this.matchVariableNamesCheckBox = new System.Windows.Forms.CheckBox();
    38       this.graphControlsGroupBox = new System.Windows.Forms.GroupBox();
    39       this.lockGenealogyCheckBox = new System.Windows.Forms.CheckBox();
    40       this.highlightAllButton = new System.Windows.Forms.Button();
    41       this.simpleLineagesCheckBox = new System.Windows.Forms.CheckBox();
    42       this.selectModeButton = new System.Windows.Forms.RadioButton();
    43       this.moveModeButton = new System.Windows.Forms.RadioButton();
    44       this.zoomModeButton = new System.Windows.Forms.RadioButton();
    4541      this.toolTip = new System.Windows.Forms.ToolTip(this.components);
     42      this.genealogyGraphChart = new HeuristicLab.EvolutionaryTracking.Views.GenealogyGraphChart();
    4643      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
    4744      this.splitContainer.Panel1.SuspendLayout();
     
    4946      this.splitContainer.SuspendLayout();
    5047      this.topControlBox.SuspendLayout();
     48      this.graphControlsGroupBox.SuspendLayout();
    5149      this.groupBox1.SuspendLayout();
    52       this.graphControlsGroupBox.SuspendLayout();
    5350      this.SuspendLayout();
    5451      //
     
    7269      this.splitContainer.Panel2MinSize = 50;
    7370      this.splitContainer.Size = new System.Drawing.Size(1066, 722);
    74       this.splitContainer.SplitterDistance = 489;
     71      this.splitContainer.SplitterDistance = 488;
    7572      this.splitContainer.TabIndex = 7;
    76       //
    77       // genealogyGraphChart
    78       //
    79       this.genealogyGraphChart.BackColor = System.Drawing.SystemColors.Control;
    80       this.genealogyGraphChart.Dock = System.Windows.Forms.DockStyle.Fill;
    81       this.genealogyGraphChart.Location = new System.Drawing.Point(0, 0);
    82       this.genealogyGraphChart.LockGenealogy = false;
    83       this.genealogyGraphChart.Name = "genealogyGraphChart";
    84       this.genealogyGraphChart.ScaleOnResize = true;
    85       this.genealogyGraphChart.SimpleLineages = false;
    86       this.genealogyGraphChart.Size = new System.Drawing.Size(487, 720);
    87       this.genealogyGraphChart.TabIndex = 2;
    8873      //
    8974      // symbolicExpressionTreeChart
     
    9479      this.symbolicExpressionTreeChart.Location = new System.Drawing.Point(0, 0);
    9580      this.symbolicExpressionTreeChart.Name = "symbolicExpressionTreeChart";
    96       this.symbolicExpressionTreeChart.Size = new System.Drawing.Size(571, 720);
     81      this.symbolicExpressionTreeChart.Size = new System.Drawing.Size(572, 720);
    9782      this.symbolicExpressionTreeChart.Spacing = 5;
    9883      this.symbolicExpressionTreeChart.SuspendRepaint = false;
     
    10590      this.topControlBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    10691            | System.Windows.Forms.AnchorStyles.Right)));
    107       this.topControlBox.Controls.Add(this.groupBox1);
    10892      this.topControlBox.Controls.Add(this.graphControlsGroupBox);
    10993      this.topControlBox.Location = new System.Drawing.Point(3, 3);
     
    11296      this.topControlBox.TabIndex = 6;
    11397      //
     98      // graphControlsGroupBox
     99      //
     100      this.graphControlsGroupBox.Controls.Add(this.lockGenealogyCheckBox);
     101      this.graphControlsGroupBox.Controls.Add(this.highlightAllButton);
     102      this.graphControlsGroupBox.Controls.Add(this.simpleLineagesCheckBox);
     103      this.graphControlsGroupBox.Location = new System.Drawing.Point(1, -2);
     104      this.graphControlsGroupBox.Name = "graphControlsGroupBox";
     105      this.graphControlsGroupBox.Size = new System.Drawing.Size(98, 44);
     106      this.graphControlsGroupBox.TabIndex = 11;
     107      this.graphControlsGroupBox.TabStop = false;
     108      this.graphControlsGroupBox.Text = "Graph controls";
     109      //
     110      // lockGenealogyCheckBox
     111      //
     112      this.lockGenealogyCheckBox.Appearance = System.Windows.Forms.Appearance.Button;
     113      this.lockGenealogyCheckBox.Location = new System.Drawing.Point(66, 14);
     114      this.lockGenealogyCheckBox.Name = "lockGenealogyCheckBox";
     115      this.lockGenealogyCheckBox.Size = new System.Drawing.Size(24, 24);
     116      this.lockGenealogyCheckBox.TabIndex = 17;
     117      this.toolTip.SetToolTip(this.lockGenealogyCheckBox, "Lock genealogy");
     118      this.lockGenealogyCheckBox.UseVisualStyleBackColor = true;
     119      this.lockGenealogyCheckBox.CheckedChanged += new System.EventHandler(this.lockGenealogyCheckBox_CheckedChanged);
     120      //
     121      // highlightAllButton
     122      //
     123      this.highlightAllButton.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
     124      this.highlightAllButton.Location = new System.Drawing.Point(6, 14);
     125      this.highlightAllButton.Name = "highlightAllButton";
     126      this.highlightAllButton.Size = new System.Drawing.Size(24, 24);
     127      this.highlightAllButton.TabIndex = 13;
     128      this.toolTip.SetToolTip(this.highlightAllButton, "Fitness gradient");
     129      this.highlightAllButton.UseVisualStyleBackColor = true;
     130      this.highlightAllButton.Click += new System.EventHandler(this.highlightAllButton_Click);
     131      //
     132      // simpleLineagesCheckBox
     133      //
     134      this.simpleLineagesCheckBox.Appearance = System.Windows.Forms.Appearance.Button;
     135      this.simpleLineagesCheckBox.Location = new System.Drawing.Point(36, 14);
     136      this.simpleLineagesCheckBox.Name = "simpleLineagesCheckBox";
     137      this.simpleLineagesCheckBox.Size = new System.Drawing.Size(24, 24);
     138      this.simpleLineagesCheckBox.TabIndex = 12;
     139      this.toolTip.SetToolTip(this.simpleLineagesCheckBox, "Simple lineages");
     140      this.simpleLineagesCheckBox.UseVisualStyleBackColor = true;
     141      this.simpleLineagesCheckBox.CheckedChanged += new System.EventHandler(this.simpleLineagesCheckBox_CheckedChanged);
     142      //
    114143      // groupBox1
    115144      //
     
    117146      this.groupBox1.Controls.Add(this.matchVariableWeightsCheckBox);
    118147      this.groupBox1.Controls.Add(this.matchVariableNamesCheckBox);
    119       this.groupBox1.Location = new System.Drawing.Point(209, -2);
     148      this.groupBox1.Location = new System.Drawing.Point(104, 1);
    120149      this.groupBox1.Name = "groupBox1";
    121150      this.groupBox1.Size = new System.Drawing.Size(325, 44);
     
    163192      this.matchVariableNamesCheckBox.CheckedChanged += new System.EventHandler(this.matchVariableNamesCheckBox_CheckedChanged);
    164193      //
    165       // graphControlsGroupBox
    166       //
    167       this.graphControlsGroupBox.Controls.Add(this.lockGenealogyCheckBox);
    168       this.graphControlsGroupBox.Controls.Add(this.highlightAllButton);
    169       this.graphControlsGroupBox.Controls.Add(this.simpleLineagesCheckBox);
    170       this.graphControlsGroupBox.Controls.Add(this.selectModeButton);
    171       this.graphControlsGroupBox.Controls.Add(this.moveModeButton);
    172       this.graphControlsGroupBox.Controls.Add(this.zoomModeButton);
    173       this.graphControlsGroupBox.Location = new System.Drawing.Point(1, -2);
    174       this.graphControlsGroupBox.Name = "graphControlsGroupBox";
    175       this.graphControlsGroupBox.Size = new System.Drawing.Size(202, 44);
    176       this.graphControlsGroupBox.TabIndex = 11;
    177       this.graphControlsGroupBox.TabStop = false;
    178       this.graphControlsGroupBox.Text = "Graph controls";
    179       //
    180       // lockGenealogyCheckBox
    181       //
    182       this.lockGenealogyCheckBox.Appearance = System.Windows.Forms.Appearance.Button;
    183       this.lockGenealogyCheckBox.Location = new System.Drawing.Point(156, 14);
    184       this.lockGenealogyCheckBox.Name = "lockGenealogyCheckBox";
    185       this.lockGenealogyCheckBox.Size = new System.Drawing.Size(24, 24);
    186       this.lockGenealogyCheckBox.TabIndex = 17;
    187       this.toolTip.SetToolTip(this.lockGenealogyCheckBox, "Lock genealogy");
    188       this.lockGenealogyCheckBox.UseVisualStyleBackColor = true;
    189       this.lockGenealogyCheckBox.CheckedChanged += new System.EventHandler(this.lockGenealogyCheckBox_CheckedChanged);
    190       //
    191       // highlightAllButton
    192       //
    193       this.highlightAllButton.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
    194       this.highlightAllButton.Location = new System.Drawing.Point(96, 14);
    195       this.highlightAllButton.Name = "highlightAllButton";
    196       this.highlightAllButton.Size = new System.Drawing.Size(24, 24);
    197       this.highlightAllButton.TabIndex = 13;
    198       this.toolTip.SetToolTip(this.highlightAllButton, "Fitness gradient");
    199       this.highlightAllButton.UseVisualStyleBackColor = true;
    200       this.highlightAllButton.Click += new System.EventHandler(this.highlightAllButton_Click);
    201       //
    202       // simpleLineagesCheckBox
    203       //
    204       this.simpleLineagesCheckBox.Appearance = System.Windows.Forms.Appearance.Button;
    205       this.simpleLineagesCheckBox.Location = new System.Drawing.Point(126, 14);
    206       this.simpleLineagesCheckBox.Name = "simpleLineagesCheckBox";
    207       this.simpleLineagesCheckBox.Size = new System.Drawing.Size(24, 24);
    208       this.simpleLineagesCheckBox.TabIndex = 12;
    209       this.toolTip.SetToolTip(this.simpleLineagesCheckBox, "Simple lineages");
    210       this.simpleLineagesCheckBox.UseVisualStyleBackColor = true;
    211       this.simpleLineagesCheckBox.CheckedChanged += new System.EventHandler(this.simpleLineagesCheckBox_CheckedChanged);
    212       //
    213       // selectModeButton
    214       //
    215       this.selectModeButton.Appearance = System.Windows.Forms.Appearance.Button;
    216       this.selectModeButton.Location = new System.Drawing.Point(66, 14);
    217       this.selectModeButton.Name = "selectModeButton";
    218       this.selectModeButton.Size = new System.Drawing.Size(24, 24);
    219       this.selectModeButton.TabIndex = 16;
    220       this.selectModeButton.TabStop = true;
    221       this.toolTip.SetToolTip(this.selectModeButton, "Select");
    222       this.selectModeButton.UseVisualStyleBackColor = true;
    223       this.selectModeButton.CheckedChanged += new System.EventHandler(this.selectModeButton_CheckedChanged);
    224       //
    225       // moveModeButton
    226       //
    227       this.moveModeButton.Appearance = System.Windows.Forms.Appearance.Button;
    228       this.moveModeButton.Location = new System.Drawing.Point(6, 14);
    229       this.moveModeButton.Name = "moveModeButton";
    230       this.moveModeButton.Size = new System.Drawing.Size(24, 24);
    231       this.moveModeButton.TabIndex = 14;
    232       this.moveModeButton.TabStop = true;
    233       this.toolTip.SetToolTip(this.moveModeButton, "Move");
    234       this.moveModeButton.UseVisualStyleBackColor = true;
    235       this.moveModeButton.CheckedChanged += new System.EventHandler(this.moveModeButton_CheckedChanged);
    236       //
    237       // zoomModeButton
    238       //
    239       this.zoomModeButton.Appearance = System.Windows.Forms.Appearance.Button;
    240       this.zoomModeButton.Location = new System.Drawing.Point(36, 14);
    241       this.zoomModeButton.Name = "zoomModeButton";
    242       this.zoomModeButton.Size = new System.Drawing.Size(24, 24);
    243       this.zoomModeButton.TabIndex = 15;
    244       this.zoomModeButton.TabStop = true;
    245       this.toolTip.SetToolTip(this.zoomModeButton, "Zoom");
    246       this.zoomModeButton.UseVisualStyleBackColor = true;
    247       this.zoomModeButton.CheckedChanged += new System.EventHandler(this.zoomModeButton_CheckedChanged);
     194      // genealogyGraphChart
     195      //
     196      this.genealogyGraphChart.BackColor = System.Drawing.SystemColors.Control;
     197      this.genealogyGraphChart.Dock = System.Windows.Forms.DockStyle.Fill;
     198      this.genealogyGraphChart.Location = new System.Drawing.Point(0, 0);
     199      this.genealogyGraphChart.LockGenealogy = false;
     200      this.genealogyGraphChart.Name = "genealogyGraphChart";
     201      this.genealogyGraphChart.ScaleOnResize = true;
     202      this.genealogyGraphChart.SimpleLineages = false;
     203      this.genealogyGraphChart.Size = new System.Drawing.Size(486, 720);
     204      this.genealogyGraphChart.TabIndex = 2;
    248205      //
    249206      // GenealogyGraphView
     
    251208      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    252209      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     210      this.Controls.Add(this.groupBox1);
    253211      this.Controls.Add(this.splitContainer);
    254212      this.Controls.Add(this.topControlBox);
     
    260218      this.splitContainer.ResumeLayout(false);
    261219      this.topControlBox.ResumeLayout(false);
     220      this.graphControlsGroupBox.ResumeLayout(false);
    262221      this.groupBox1.ResumeLayout(false);
    263222      this.groupBox1.PerformLayout();
    264       this.graphControlsGroupBox.ResumeLayout(false);
    265223      this.ResumeLayout(false);
    266224
     
    282240    private System.Windows.Forms.Button highlightAllButton;
    283241    private System.Windows.Forms.CheckBox simpleLineagesCheckBox;
    284     private System.Windows.Forms.RadioButton selectModeButton;
    285     private System.Windows.Forms.RadioButton moveModeButton;
    286     private System.Windows.Forms.RadioButton zoomModeButton;
    287242    private System.Windows.Forms.CheckBox lockGenealogyCheckBox;
    288243
  • 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}
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/HeuristicLab.EvolutionaryTracking.Views-3.4.csproj

    r9420 r9835  
    7171      <Private>False</Private>
    7272    </Reference>
    73     <Reference Include="HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    74       <SpecificVersion>False</SpecificVersion>
    75       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4.dll</HintPath>
    76       <Private>False</Private>
    77     </Reference>
    7873    <Reference Include="HeuristicLab.MainForm-3.3">
    7974      <HintPath>..\..\..\trunk\sources\bin\HeuristicLab.MainForm-3.3.dll</HintPath>
     
    138133      <DependentUpon>GenealogyGraphView.cs</DependentUpon>
    139134    </Compile>
     135    <Compile Include="Karyogram.cs">
     136      <SubType>UserControl</SubType>
     137    </Compile>
     138    <Compile Include="Karyogram.Designer.cs">
     139      <DependentUpon>Karyogram.cs</DependentUpon>
     140    </Compile>
    140141    <Compile Include="LineageExplorerView.cs">
    141142      <SubType>UserControl</SubType>
     
    156157  </ItemGroup>
    157158  <ItemGroup>
     159    <ProjectReference Include="..\..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views\3.4\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4.csproj">
     160      <Project>{423bd94f-963a-438e-ba45-3bb3d61cd03b}</Project>
     161      <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4</Name>
     162      <Private>False</Private>
     163    </ProjectReference>
    158164    <ProjectReference Include="..\..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding\3.4\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj">
    159165      <Project>{06d4a186-9319-48a0-bade-a2058d462eea}</Project>
     
    178184    <EmbeddedResource Include="FrequentFragmentsDialog.resx">
    179185      <DependentUpon>FrequentFragmentsDialog.cs</DependentUpon>
    180     </EmbeddedResource>
    181     <EmbeddedResource Include="GenealogyGraphChart.resx">
    182       <DependentUpon>GenealogyGraphChart.cs</DependentUpon>
    183186    </EmbeddedResource>
    184187    <EmbeddedResource Include="GenealogyGraphDialog.resx">
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/LineageExplorerView.Designer.cs

    r9420 r9835  
    2525    private void InitializeComponent() {
    2626      this.components = new System.ComponentModel.Container();
    27       this.tabControl1 = new System.Windows.Forms.TabControl();
     27      this.karyographTab = new System.Windows.Forms.TabControl();
    2828      this.tabPage1 = new System.Windows.Forms.TabPage();
    29       this.tabPage2 = new System.Windows.Forms.TabPage();
    3029      this.panel1 = new System.Windows.Forms.Panel();
    3130      this.qualityImprovementTreeView = new System.Windows.Forms.TreeView();
    3231      this.symbolicExpressionTreeChart = new HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.SymbolicExpressionTreeChart();
    3332      this.scopeListTreeView = new System.Windows.Forms.TreeView();
     33      this.panel2 = new System.Windows.Forms.Panel();
     34      this.button1 = new System.Windows.Forms.Button();
     35      this.showGenealogyButton = new System.Windows.Forms.Button();
    3436      this.calculateFragmentFrequencyButton = new System.Windows.Forms.Button();
    35       this.showGenealogyButton = new System.Windows.Forms.Button();
    36       this.button1 = new System.Windows.Forms.Button();
    37       this.panel2 = new System.Windows.Forms.Panel();
     37      this.tabPage2 = new System.Windows.Forms.TabPage();
     38      this.panel4 = new System.Windows.Forms.Panel();
    3839      this.panel3 = new System.Windows.Forms.Panel();
    3940      this.showFrequentFragmentsButton = new System.Windows.Forms.Button();
     
    4243      this.bestNTextBox = new System.Windows.Forms.TextBox();
    4344      this.consideredTrees = new System.Windows.Forms.Label();
    44       this.panel4 = new System.Windows.Forms.Panel();
    45       this.tabControl1.SuspendLayout();
     45      this.tabPage3 = new System.Windows.Forms.TabPage();
     46      this.karyograph1 = new HeuristicLab.EvolutionaryTracking.Views.Karyogram();
     47      this.karyographTab.SuspendLayout();
    4648      this.tabPage1.SuspendLayout();
    47       this.tabPage2.SuspendLayout();
    4849      this.panel1.SuspendLayout();
    4950      this.panel2.SuspendLayout();
     51      this.tabPage2.SuspendLayout();
    5052      this.panel3.SuspendLayout();
     53      this.tabPage3.SuspendLayout();
    5154      this.SuspendLayout();
    5255      //
    53       // tabControl1
    54       //
    55       this.tabControl1.Controls.Add(this.tabPage1);
    56       this.tabControl1.Controls.Add(this.tabPage2);
    57       this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
    58       this.tabControl1.Location = new System.Drawing.Point(0, 0);
    59       this.tabControl1.Name = "tabControl1";
    60       this.tabControl1.SelectedIndex = 0;
    61       this.tabControl1.Size = new System.Drawing.Size(1016, 669);
    62       this.tabControl1.TabIndex = 2;
     56      // karyographTab
     57      //
     58      this.karyographTab.Controls.Add(this.tabPage1);
     59      this.karyographTab.Controls.Add(this.tabPage2);
     60      this.karyographTab.Controls.Add(this.tabPage3);
     61      this.karyographTab.Dock = System.Windows.Forms.DockStyle.Fill;
     62      this.karyographTab.Location = new System.Drawing.Point(0, 0);
     63      this.karyographTab.Name = "karyographTab";
     64      this.karyographTab.SelectedIndex = 0;
     65      this.karyographTab.Size = new System.Drawing.Size(1016, 669);
     66      this.karyographTab.TabIndex = 2;
    6367      //
    6468      // tabPage1
     
    7377      this.tabPage1.Text = "Lineages";
    7478      this.tabPage1.UseVisualStyleBackColor = true;
    75       //
    76       // tabPage2
    77       //
    78       this.tabPage2.Controls.Add(this.panel4);
    79       this.tabPage2.Controls.Add(this.panel3);
    80       this.tabPage2.Location = new System.Drawing.Point(4, 22);
    81       this.tabPage2.Name = "tabPage2";
    82       this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
    83       this.tabPage2.Size = new System.Drawing.Size(1008, 643);
    84       this.tabPage2.TabIndex = 1;
    85       this.tabPage2.Text = "Fragments";
    86       this.tabPage2.UseVisualStyleBackColor = true;
    8779      //
    8880      // panel1
     
    134126      this.scopeListTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.scopeListTreeView_AfterSelect);
    135127      //
     128      // panel2
     129      //
     130      this.panel2.Controls.Add(this.button1);
     131      this.panel2.Controls.Add(this.showGenealogyButton);
     132      this.panel2.Controls.Add(this.calculateFragmentFrequencyButton);
     133      this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
     134      this.panel2.Location = new System.Drawing.Point(3, 3);
     135      this.panel2.Name = "panel2";
     136      this.panel2.Size = new System.Drawing.Size(1002, 33);
     137      this.panel2.TabIndex = 1;
     138      //
     139      // button1
     140      //
     141      this.button1.AutoSize = true;
     142      this.button1.Location = new System.Drawing.Point(239, 4);
     143      this.button1.Name = "button1";
     144      this.button1.Size = new System.Drawing.Size(135, 23);
     145      this.button1.TabIndex = 2;
     146      this.button1.Text = "Show frequent fragments";
     147      this.button1.UseVisualStyleBackColor = true;
     148      this.button1.Click += new System.EventHandler(this.button1_Click);
     149      //
     150      // showGenealogyButton
     151      //
     152      this.showGenealogyButton.AutoSize = true;
     153      this.showGenealogyButton.Location = new System.Drawing.Point(129, 4);
     154      this.showGenealogyButton.Name = "showGenealogyButton";
     155      this.showGenealogyButton.Size = new System.Drawing.Size(104, 23);
     156      this.showGenealogyButton.TabIndex = 1;
     157      this.showGenealogyButton.Text = "Show genealogy";
     158      this.showGenealogyButton.UseVisualStyleBackColor = true;
     159      this.showGenealogyButton.Click += new System.EventHandler(this.showGenealogyButton_Click);
     160      //
    136161      // calculateFragmentFrequencyButton
    137162      //
     
    145170      this.calculateFragmentFrequencyButton.Click += new System.EventHandler(this.calculateFragmentFrequencyButton_Click);
    146171      //
    147       // showGenealogyButton
    148       //
    149       this.showGenealogyButton.AutoSize = true;
    150       this.showGenealogyButton.Location = new System.Drawing.Point(129, 4);
    151       this.showGenealogyButton.Name = "showGenealogyButton";
    152       this.showGenealogyButton.Size = new System.Drawing.Size(104, 23);
    153       this.showGenealogyButton.TabIndex = 1;
    154       this.showGenealogyButton.Text = "Show genealogy";
    155       this.showGenealogyButton.UseVisualStyleBackColor = true;
    156       this.showGenealogyButton.Click += new System.EventHandler(this.showGenealogyButton_Click);
    157       //
    158       // button1
    159       //
    160       this.button1.AutoSize = true;
    161       this.button1.Location = new System.Drawing.Point(239, 4);
    162       this.button1.Name = "button1";
    163       this.button1.Size = new System.Drawing.Size(135, 23);
    164       this.button1.TabIndex = 2;
    165       this.button1.Text = "Show frequent fragments";
    166       this.button1.UseVisualStyleBackColor = true;
    167       this.button1.Click += new System.EventHandler(this.button1_Click);
    168       //
    169       // panel2
    170       //
    171       this.panel2.Controls.Add(this.button1);
    172       this.panel2.Controls.Add(this.showGenealogyButton);
    173       this.panel2.Controls.Add(this.calculateFragmentFrequencyButton);
    174       this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
    175       this.panel2.Location = new System.Drawing.Point(3, 3);
    176       this.panel2.Name = "panel2";
    177       this.panel2.Size = new System.Drawing.Size(1002, 33);
    178       this.panel2.TabIndex = 1;
     172      // tabPage2
     173      //
     174      this.tabPage2.Controls.Add(this.panel4);
     175      this.tabPage2.Controls.Add(this.panel3);
     176      this.tabPage2.Location = new System.Drawing.Point(4, 22);
     177      this.tabPage2.Name = "tabPage2";
     178      this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
     179      this.tabPage2.Size = new System.Drawing.Size(1008, 643);
     180      this.tabPage2.TabIndex = 1;
     181      this.tabPage2.Text = "Fragments";
     182      this.tabPage2.UseVisualStyleBackColor = true;
     183      //
     184      // panel4
     185      //
     186      this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
     187      this.panel4.Location = new System.Drawing.Point(3, 33);
     188      this.panel4.Name = "panel4";
     189      this.panel4.Size = new System.Drawing.Size(1002, 607);
     190      this.panel4.TabIndex = 1;
    179191      //
    180192      // panel3
     
    236248      this.consideredTrees.Text = "Best n trees";
    237249      //
    238       // panel4
    239       //
    240       this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
    241       this.panel4.Location = new System.Drawing.Point(3, 33);
    242       this.panel4.Name = "panel4";
    243       this.panel4.Size = new System.Drawing.Size(1002, 607);
    244       this.panel4.TabIndex = 1;
     250      // tabPage3
     251      //
     252      this.tabPage3.Controls.Add(this.karyograph1);
     253      this.tabPage3.Location = new System.Drawing.Point(4, 22);
     254      this.tabPage3.Name = "tabPage3";
     255      this.tabPage3.Padding = new System.Windows.Forms.Padding(3);
     256      this.tabPage3.Size = new System.Drawing.Size(1008, 643);
     257      this.tabPage3.TabIndex = 2;
     258      this.tabPage3.Text = "Karyograph";
     259      this.tabPage3.UseVisualStyleBackColor = true;
     260      //
     261      // karyograph1
     262      //
     263      this.karyograph1.BackColor = System.Drawing.SystemColors.Control;
     264      this.karyograph1.Chart = null;
     265      this.karyograph1.Dock = System.Windows.Forms.DockStyle.Fill;
     266      this.karyograph1.Location = new System.Drawing.Point(3, 3);
     267      this.karyograph1.Name = "karyograph1";
     268      this.karyograph1.ScaleOnResize = true;
     269      this.karyograph1.Size = new System.Drawing.Size(1002, 637);
     270      this.karyograph1.TabIndex = 0;
    245271      //
    246272      // LineageExplorerView
     
    248274      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    249275      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    250       this.Controls.Add(this.tabControl1);
     276      this.Controls.Add(this.karyographTab);
    251277      this.Name = "LineageExplorerView";
    252278      this.Size = new System.Drawing.Size(1016, 669);
    253       this.tabControl1.ResumeLayout(false);
     279      this.karyographTab.ResumeLayout(false);
    254280      this.tabPage1.ResumeLayout(false);
    255       this.tabPage2.ResumeLayout(false);
    256281      this.panel1.ResumeLayout(false);
    257282      this.panel2.ResumeLayout(false);
    258283      this.panel2.PerformLayout();
     284      this.tabPage2.ResumeLayout(false);
    259285      this.panel3.ResumeLayout(false);
    260286      this.panel3.PerformLayout();
     287      this.tabPage3.ResumeLayout(false);
    261288      this.ResumeLayout(false);
    262289
     
    265292    #endregion
    266293
    267     private System.Windows.Forms.TabControl tabControl1;
     294    private System.Windows.Forms.TabControl karyographTab;
    268295    private System.Windows.Forms.TabPage tabPage1;
    269296    private System.Windows.Forms.Panel panel1;
     
    283310    private System.Windows.Forms.Label consideredTrees;
    284311    private System.Windows.Forms.Panel panel4;
     312    private System.Windows.Forms.TabPage tabPage3;
     313    private Karyogram karyograph1;
    285314
    286315
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/LineageExplorerView.cs

    r9420 r9835  
    5959        }
    6060      }
     61
     62      karyograph1.Trees = Content.Trees.OrderByDescending(x => x.Item2).Select(x => x.Item1).ToList();
    6163    }
    6264
     
    155157      var trees = Content.GenealogyGraph.Nodes.Where(x => x.Rank.IsAlmost(graphNode.Rank)).Select(x => x.SymbolicExpressionTree).ToList();
    156158
    157       var fragments = graphNode.SymbolicExpressionTree.IterateNodesBreadth().Select(n => new Fragment(n));
     159      var fragments = graphNode.SymbolicExpressionTree.IterateNodesBreadth().Select(n => new Fragment { Root = n });
    158160
    159161      var similarityComparer = new SymbolicExpressionTreeNodeSimilarityComparer {
     
    241243      };
    242244
    243       var fragments = bestTrees.SelectMany(t => t.IterateNodesBreadth()).Where(n => n.GetLength() >= 3).Distinct(similarityComparer).Select(n => new Fragment(n));
     245      var fragments = bestTrees.SelectMany(t => t.IterateNodesBreadth()).Where(n => n.GetLength() >= 3).Distinct(similarityComparer).Select(n => new Fragment { Root = n });
    244246
    245247      double bestNQuality = tuples.Take(bestN).Sum(x => x.Quality); // average quality of best N individuals in the population
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/Plugin.cs

    r8213 r9835  
    2727  [PluginDependency("HeuristicLab.Core", "3.3")]
    2828  [PluginDependency("HeuristicLab.Core.Views", "3.3")]
     29  [PluginDependency("HeuristicLab.Common", "3.3")]
     30  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
    2931  [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding", "3.4")]
    3032  [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views", "3.4")]
Note: See TracChangeset for help on using the changeset viewer.