Free cookie consent management tool by TermsFeed Policy Generator

Changeset 8656


Ignore:
Timestamp:
09/14/12 12:53:28 (12 years ago)
Author:
ascheibe
Message:

#1950 removed redundant event handler additions and removals

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Clients.Hive.Views/3.3/StateLog/StateLogGanttChartListView.cs

    r8107 r8656  
    4444      InitializeComponent();
    4545      invisibleLegendItems = new List<LegendItem>();
     46      ganttChart.chart.MouseMove += new System.Windows.Forms.MouseEventHandler(chart_MouseMove);
     47      ganttChart.chart.MouseDown += new System.Windows.Forms.MouseEventHandler(chart_MouseDown);
     48      ganttChart.chart.CustomizeLegend += new EventHandler<CustomizeLegendEventArgs>(chart_CustomizeLegend);
    4649    }
    4750
    4851    protected override void DeregisterContentEvents() {
    49       // Deregister your event handlers here
    50       ganttChart.chart.MouseMove -= new System.Windows.Forms.MouseEventHandler(chart_MouseDown);
    51       ganttChart.chart.MouseDown -= new System.Windows.Forms.MouseEventHandler(chart_MouseDown);
    52       ganttChart.chart.CustomizeLegend -= new EventHandler<CustomizeLegendEventArgs>(chart_CustomizeLegend);
    5352      base.DeregisterContentEvents();
    5453    }
     
    5655    protected override void RegisterContentEvents() {
    5756      base.RegisterContentEvents();
    58       // Register your event handlers here
    59       ganttChart.chart.MouseMove += new System.Windows.Forms.MouseEventHandler(chart_MouseMove);
    60       ganttChart.chart.MouseDown += new System.Windows.Forms.MouseEventHandler(chart_MouseDown);
    61       ganttChart.chart.CustomizeLegend += new EventHandler<CustomizeLegendEventArgs>(chart_CustomizeLegend);
    6257    }
    6358
    6459    protected override void OnContentChanged() {
    6560      base.OnContentChanged();
    66       if (Content == null) {
    67         ganttChart.Reset();
    68       } else {
    69         ganttChart.Reset();
     61
     62      ganttChart.Reset();
     63      if (Content != null) {
    7064        SetupCategories(ganttChart);
    7165        if (Content.Count > 0) {
Note: See TracChangeset for help on using the changeset viewer.