Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/04/13 17:24:46 (11 years ago)
Author:
ascheibe
Message:

#1886

  • removed old caching code
  • adapted convex hull view and some other minor improvements
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching.Views/3.3/SolutionCacheView.cs

    r10024 r10026  
    3030namespace HeuristicLab.Analysis.SolutionCaching.Views {
    3131  [View("SolutionCache View")]
    32   [Content(typeof(SolutionCache<,>), false)]
     32  [Content(typeof(SolutionCache<,>), true)]
    3333  public abstract partial class SolutionCacheView<TKey, TValue> : ItemView
    3434    where TKey : Item
    35     where TValue : Item {
     35    where TValue : SolutionInformation<TKey> {
    3636    public SolutionCacheView() {
    3737      InitializeComponent();
     
    4949      if (Content != null) {
    5050        cacheSizeTextBox.Text = Content.Size().ToString();
     51        InitializeMenu();
    5152      }
    5253    }
    5354
    54     protected override void OnInitialized(EventArgs e) {
    55       base.OnInitialized(e);
    56       var viewTypes = MainFormManager.GetViewTypes(typeof(SolutionCache<TKey, TValue>), true);
     55    protected virtual void InitializeMenu() {
     56      var viewTypes = MainFormManager.GetViewTypes(this.Content.GetType(), false);
    5757      foreach (Type viewType in viewTypes.OrderBy(x => ViewAttribute.GetViewName(x))) {
    58         if ((viewType != typeof(SolutionCacheView<TKey, TValue>)) && (viewType != typeof(ViewHost))) {
     58        if (viewType != typeof(ViewHost)) {
    5959          ToolStripMenuItem menuItem = new ToolStripMenuItem();
    6060          menuItem.Text = ViewAttribute.GetViewName(viewType);
Note: See TracChangeset for help on using the changeset viewer.