Changeset 13720 for branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Menu/100_Understanding
- Timestamp:
- 03/19/16 22:35:39 (9 years ago)
- Location:
- branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Menu/100_Understanding
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Menu/100_Understanding/110_ProblemInstanceMenuItem.cs
r13718 r13720 20 20 #endregion 21 21 22 using HeuristicLab.Common.Resources; 23 using HeuristicLab.MainForm.WindowsForms; 22 24 using System.Collections.Generic; 25 using System.Drawing; 23 26 using System.Linq; 24 27 25 28 namespace HeuristicLab.OptimizationExpertSystem.Menu { 26 29 internal class ProblemInstanceMenuItem : MenuItemBase { 27 public override void Execute() {28 var view = MainForm.Views.OfType<UnderstandingProblemInstanceView>().FirstOrDefault(); 29 if (view != null) view.Show();30 else MainForm.ShowContent(MainForm.ExpertSystem, typeof(UnderstandingProblemInstanceView));30 public override Image Image { get { return VSImageLibrary.Statistics; } } 31 32 public override string Name { 33 get { return "Problem Instance"; } 31 34 } 32 35 … … 35 38 } 36 39 37 public override string Name {38 get { return "Problem Instance"; }39 }40 41 40 public override int Position { 42 41 get { return 110; } 43 42 } 43 44 public override void Execute() { 45 var viewType = typeof(UnderstandingProblemInstanceView); 46 var view = MainForm.Views.FirstOrDefault(x => viewType == ((x is ViewHost) ? ((ViewHost)x).ActiveView : x).GetType()); 47 if (view != null) view.Show(); 48 else MainForm.ShowContent(MainForm.ExpertSystem, viewType); 49 } 44 50 } 45 51 } -
branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Menu/100_Understanding/120_SolutionsMenuItem.cs
r13718 r13720 20 20 #endregion 21 21 22 using System; 22 using HeuristicLab.Common.Resources; 23 using HeuristicLab.MainForm.WindowsForms; 23 24 using System.Collections.Generic; 25 using System.Drawing; 26 using System.Linq; 24 27 25 28 namespace HeuristicLab.OptimizationExpertSystem.Menu { 26 29 internal class SolutionSimilarityMenuItem : MenuItemBase { 30 public override Image Image { get { return VSImageLibrary.Performance; } } 31 27 32 public override void Execute() { 28 throw new NotImplementedException(); 33 var viewType = typeof(UnderstandingSolutionsView); 34 var view = MainForm.Views.FirstOrDefault(x => viewType == ((x is ViewHost) ? ((ViewHost)x).ActiveView : x).GetType()); 35 if (view != null) view.Show(); 36 else MainForm.ShowContent(MainForm.ExpertSystem, viewType); 29 37 } 30 38
Note: See TracChangeset
for help on using the changeset viewer.