Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/04/12 15:42:21 (12 years ago)
Author:
mkommend
Message:

#1673: Added new property AlgorithmName to the RunCollection and synced the property with the name of the surrounding IOptimizer. The AlgorithmName is used by the RunCollectionViews as prefix for its caption if it was set.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionViews/RunCollectionBoxPlotView.cs

    r7469 r8738  
    7575      Content.CollectionReset += new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
    7676      Content.UpdateOfRunsInProgressChanged += new EventHandler(Content_UpdateOfRunsInProgressChanged);
     77      Content.AlgorithmNameChanged += new EventHandler(Content_AlgorithmNameChanged);
    7778      RegisterRunEvents(Content);
    7879    }
     
    8586      Content.CollectionReset -= new HeuristicLab.Collections.CollectionItemsChangedEventHandler<IRun>(Content_CollectionReset);
    8687      Content.UpdateOfRunsInProgressChanged -= new EventHandler(Content_UpdateOfRunsInProgressChanged);
     88      Content.AlgorithmNameChanged -= new EventHandler(Content_AlgorithmNameChanged);
    8789      DeregisterRunEvents(Content);
    8890    }
     
    139141      }
    140142    }
     143
     144    private void Content_AlgorithmNameChanged(object sender, EventArgs e) {
     145      if (InvokeRequired)
     146        Invoke(new EventHandler(Content_AlgorithmNameChanged), sender, e);
     147      else UpdateCaption();
     148    }
    141149    #endregion
    142150
     
    147155      UpdateComboBoxes();
    148156      UpdateDataPoints();
     157      UpdateCaption();
     158    }
     159
     160    private void UpdateCaption() {
     161      Caption = Content != null ? Content.AlgorithmName + "Box Plots" : ViewAttribute.GetViewName(GetType());
    149162    }
    150163
Note: See TracChangeset for help on using the changeset viewer.