Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/09/17 09:35:42 (7 years ago)
Author:
abeham
Message:

#2744:

  • GanttData: Derived from NamedItem instead of Item and implement appropriate constructors
  • GanttRow: Implemented appropriate constructors and choosing a default name
  • GanttDataView: Added additional event handler for tracking category colors dictionary
  • GanttDataView: Set title property of GanttChart
  • GanttChart: Added a title (which is hidden by default)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Analysis.Views/3.3/GanttDataView.cs

    r14734 r14737  
    5050      Content.Rows.ItemsReplaced += GanttRowsOnChanged;
    5151      Content.Rows.CollectionReset += GanttRowsOnChanged;
     52      Content.CategoryColors.ItemsAdded += GanttCategoryColorsOnChanged;
     53      Content.CategoryColors.ItemsRemoved += GanttCategoryColorsOnChanged;
     54      Content.CategoryColors.ItemsReplaced += GanttCategoryColorsOnChanged;
     55      Content.CategoryColors.CollectionReset += GanttCategoryColorsOnChanged;
    5256      foreach (var row in Content.Rows)
    5357        RegisterGanttRowEvents(row);
     
    7377      Content.Rows.ItemsReplaced -= GanttRowsOnChanged;
    7478      Content.Rows.CollectionReset -= GanttRowsOnChanged;
     79      Content.CategoryColors.ItemsAdded -= GanttCategoryColorsOnChanged;
     80      Content.CategoryColors.ItemsRemoved -= GanttCategoryColorsOnChanged;
     81      Content.CategoryColors.ItemsReplaced -= GanttCategoryColorsOnChanged;
     82      Content.CategoryColors.CollectionReset -= GanttCategoryColorsOnChanged;
    7583      foreach (var row in Content.Rows)
    7684        DeregisterGanttRowEvents(row);
     
    121129     
    122130      ganttChart.Hide();
     131      ganttChart.Title = string.IsNullOrWhiteSpace(Content.Name) ? null : Content.Name;
    123132      foreach (var row in Content.Rows) {
    124133        foreach (var item in row.Items) {
     
    138147      UpdateVisualization();
    139148    }
    140 
    141149    private void GanttRowsOnRemoved(object sender, CollectionItemsChangedEventArgs<GanttRow> e) {
    142150      foreach (var row in e.Items)
    143151        DeregisterGanttRowEvents(row);
    144152
     153      UpdateVisualization();
     154    }
     155    private void GanttCategoryColorsOnChanged(object sender, EventArgs e) {
    145156      UpdateVisualization();
    146157    }
Note: See TracChangeset for help on using the changeset viewer.