- Timestamp:
- 04/18/10 02:08:29 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.2/ViewContextMenuStrip.cs
r2992 r3389 12 12 InitializeComponent(); 13 13 this.menuItems = new Dictionary<Type, ToolStripMenuItem>(); 14 this.ignoredViewTypes = new List<Type>(); 14 15 } 15 16 … … 30 31 } 31 32 33 private List<Type> ignoredViewTypes; 34 public IEnumerable<Type> IgnoredViewTypes { 35 get { return this.ignoredViewTypes; } 36 set { this.ignoredViewTypes = new List<Type>(value); RefreshMenuItems(); } 37 } 38 32 39 private Dictionary<Type, ToolStripMenuItem> menuItems; 33 40 public IEnumerable<KeyValuePair<Type, ToolStripMenuItem>> MenuItems { … … 42 49 ToolStripMenuItem menuItem; 43 50 IEnumerable<Type> types = MainFormManager.GetViewTypes(item.GetType(),true); 44 foreach (Type t in types ) {51 foreach (Type t in types.Except(IgnoredViewTypes)) { 45 52 menuItem = new ToolStripMenuItem(); 46 53 menuItem.Tag = t;
Note: See TracChangeset
for help on using the changeset viewer.