Changeset 10026 for branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching.Views/3.3
- Timestamp:
- 10/04/13 17:24:46 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Analysis.AlgorithmBehavior/HeuristicLab.Analysis.SolutionCaching.Views/3.3/SolutionCacheView.cs
r10024 r10026 30 30 namespace HeuristicLab.Analysis.SolutionCaching.Views { 31 31 [View("SolutionCache View")] 32 [Content(typeof(SolutionCache<,>), false)]32 [Content(typeof(SolutionCache<,>), true)] 33 33 public abstract partial class SolutionCacheView<TKey, TValue> : ItemView 34 34 where TKey : Item 35 where TValue : Item{35 where TValue : SolutionInformation<TKey> { 36 36 public SolutionCacheView() { 37 37 InitializeComponent(); … … 49 49 if (Content != null) { 50 50 cacheSizeTextBox.Text = Content.Size().ToString(); 51 InitializeMenu(); 51 52 } 52 53 } 53 54 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); 57 57 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)) { 59 59 ToolStripMenuItem menuItem = new ToolStripMenuItem(); 60 60 menuItem.Text = ViewAttribute.GetViewName(viewType);
Note: See TracChangeset
for help on using the changeset viewer.