Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/27/13 12:19:41 (11 years ago)
Author:
ascheibe
Message:

#2031

  • renamed statistical run collection views
  • implemented RunCollection events in statistical testing view
  • incorporate content name into view caption
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/StatisticalTesting/HeuristicLab.Analysis.Statistics/3.3/StatisticalTestingView.cs

    r9813 r9911  
    3131
    3232namespace HeuristicLab.Analysis.Statistics {
    33   [View("RunCollection Statistical Testing")]
     33  [View("Statistical Testing")]
    3434  [Content(typeof(RunCollection), false)]
    3535  public sealed partial class StatisticalTestingView : ItemView {
     
    5959        RebuildDataTable();
    6060      }
     61      UpdateCaption();
     62    }
     63
     64    private void UpdateCaption() {
     65      Caption = Content != null ? Content.OptimizerName + " Statistical Testing" : ViewAttribute.GetViewName(GetType());
    6166    }
    6267
     
    6469    protected override void RegisterContentEvents() {
    6570      base.RegisterContentEvents();
     71      Content.ItemsAdded += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded);
     72      Content.ItemsRemoved += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved);
     73      Content.CollectionReset += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
     74      Content.UpdateOfRunsInProgressChanged += Content_UpdateOfRunsInProgressChanged;
    6675    }
    6776
    6877    protected override void DeregisterContentEvents() {
    6978      base.DeregisterContentEvents();
     79      Content.ItemsAdded -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsAdded);
     80      Content.ItemsRemoved -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_ItemsRemoved);
     81      Content.CollectionReset -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
     82      Content.UpdateOfRunsInProgressChanged -= Content_UpdateOfRunsInProgressChanged;
     83    }
     84
     85    private void Content_CollectionReset(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
     86      RebuildDataTable();
     87    }
     88
     89    private void Content_ItemsRemoved(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
     90      RebuildDataTable();
     91    }
     92
     93    private void Content_ItemsAdded(object sender, HeuristicLab.Collections.CollectionItemsChangedEventArgs<IRun> e) {
     94      RebuildDataTable();
     95    }
     96
     97    void Content_UpdateOfRunsInProgressChanged(object sender, EventArgs e) {
     98      if (!Content.UpdateOfRunsInProgress) {
     99        RebuildDataTable();
     100      }
    70101    }
    71102    #endregion
Note: See TracChangeset for help on using the changeset viewer.