Free cookie consent management tool by TermsFeed Policy Generator

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

Last change on this file since 10347 was 10347, checked in by bburlacu, 10 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
Line 
1using System.Windows.Forms;
2using HeuristicLab.Common;
3using HeuristicLab.Core.Views;
4using HeuristicLab.MainForm;
5
6namespace HeuristicLab.EvolutionTracking.Views {
7  [View("GenealogyGraphView")]
8  [Content(typeof(GenealogyGraph), IsDefaultView = false)]
9  public partial class GenealogyGraphView : ItemView {
10    public new IGenealogyGraph Content {
11      get { return (IGenealogyGraph)base.Content; }
12      set { base.Content = value; }
13    }
14
15    public GenealogyGraphView() {
16      InitializeComponent();
17
18      genealogyGraphChart.GenealogyGraphNodeClicked += graphChart_GenealogyGraphNodeClicked;
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)
32
33    public virtual void graphChart_GenealogyGraphNodeClicked(object sender, MouseEventArgs args) {
34      var content = ((VisualGenealogyGraphNode)sender).Data.Content;
35      if (content != null) {
36        viewHost.Content = (IContent)content;
37      }
38    }
39    // TODO: Put event handlers of the content here
40    #endregion
41
42    protected override void OnContentChanged() {
43      base.OnContentChanged();
44      if (Content == null) {
45      } else {
46        genealogyGraphChart.GenealogyGraph = Content;
47      }
48    }
49
50    protected override void SetEnabledStateOfControls() {
51      base.SetEnabledStateOfControls();
52      // TODO: Enable or disable controls based on whether the content is null or the view is set readonly
53    }
54
55    #region Event Handlers (child controls)
56    // TODO: Put event handlers of child controls here.
57    #endregion
58  }
59}
Note: See TracBrowser for help on using the repository browser.