Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.EvolutionTracking/HeuristicLab.EvolutionTracking.Views/3.4/GenealogyGraphView.cs @ 10463

Last change on this file since 10463 was 10347, checked in by bburlacu, 11 years ago

#1772: Small changes to the GenealogyGraph. Added generic Fragment class and interface. Added the SymbolicDataAnalysisPopulationDiversityAnalyzer. Added specialized tracking operators for symbolic data analysis. Merged trunk changes.

File size: 1.8 KB
RevLine 
[10302]1using System.Windows.Forms;
2using HeuristicLab.Common;
3using HeuristicLab.Core.Views;
[10264]4using HeuristicLab.MainForm;
5
[10271]6namespace HeuristicLab.EvolutionTracking.Views {
[10300]7  [View("GenealogyGraphView")]
8  [Content(typeof(GenealogyGraph), IsDefaultView = false)]
[10347]9  public partial class GenealogyGraphView : ItemView {
[10300]10    public new IGenealogyGraph Content {
11      get { return (IGenealogyGraph)base.Content; }
[10264]12      set { base.Content = value; }
13    }
14
[10300]15    public GenealogyGraphView() {
[10264]16      InitializeComponent();
[10302]17
18      genealogyGraphChart.GenealogyGraphNodeClicked += graphChart_GenealogyGraphNodeClicked;
[10264]19    }
20
21    protected override void DeregisterContentEvents() {
22      // TODO: Deregister your event handlers here
23      base.DeregisterContentEvents();
24    }
25
26    protected override void RegisterContentEvents() {
27      base.RegisterContentEvents();
28      // TODO: Register your event handlers here
29    }
30
31    #region Event Handlers (Content)
[10302]32
[10347]33    public virtual void graphChart_GenealogyGraphNodeClicked(object sender, MouseEventArgs args) {
[10302]34      var content = ((VisualGenealogyGraphNode)sender).Data.Content;
35      if (content != null) {
36        viewHost.Content = (IContent)content;
37      }
38    }
[10264]39    // TODO: Put event handlers of the content here
[10300]40    #endregion
41
[10264]42    protected override void OnContentChanged() {
43      base.OnContentChanged();
[10300]44      if (Content == null) {
45      } else {
46        genealogyGraphChart.GenealogyGraph = Content;
47      }
[10264]48    }
[10300]49
[10264]50    protected override void SetEnabledStateOfControls() {
51      base.SetEnabledStateOfControls();
[10300]52      // TODO: Enable or disable controls based on whether the content is null or the view is set readonly
[10264]53    }
54
55    #region Event Handlers (child controls)
[10300]56    // TODO: Put event handlers of child controls here.
[10264]57    #endregion
58  }
59}
Note: See TracBrowser for help on using the repository browser.