Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/07/10 11:38:19 (15 years ago)
Author:
mkommend
Message:

implemented showInViewHost and moved ViewHost from Core.Views to MainForm.WindowsForm (ticket #961)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.MainForm/3.2/ViewAttribute.cs

    r2837 r3281  
    3131    public ViewAttribute(string name) {
    3232      this.name = name;
     33      this.showInViewHost = false;
    3334    }
    3435
     
    3738      get { return this.name; }
    3839      set { this.name = value; }
     40    }
     41
     42    private bool showInViewHost;
     43    public bool ShowInViewHost {
     44      get { return this.showInViewHost; }
     45      set { this.showInViewHost = value; }
    3946    }
    4047
     
    5057      return viewType.Name;
    5158    }
     59
     60    public static bool GetShowInViewHost(MemberInfo viewType) {
     61      ViewAttribute[] attributes = (ViewAttribute[])viewType.GetCustomAttributes(typeof(ViewAttribute), false);
     62      if (attributes.Length == 1)
     63        return attributes[0].showInViewHost;
     64      return false;
     65    }
    5266  }
    5367}
Note: See TracChangeset for help on using the changeset viewer.