Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/19/16 22:35:39 (9 years ago)
Author:
abeham
Message:

#2457: worked on expert-system

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  
    2020#endregion
    2121
     22using HeuristicLab.Common.Resources;
     23using HeuristicLab.MainForm.WindowsForms;
    2224using System.Collections.Generic;
     25using System.Drawing;
    2326using System.Linq;
    2427
    2528namespace HeuristicLab.OptimizationExpertSystem.Menu {
    2629  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"; }
    3134    }
    3235
     
    3538    }
    3639
    37     public override string Name {
    38       get { return "Problem Instance"; }
    39     }
    40 
    4140    public override int Position {
    4241      get { return 110; }
    4342    }
     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    }
    4450  }
    4551}
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Menu/100_Understanding/120_SolutionsMenuItem.cs

    r13718 r13720  
    2020#endregion
    2121
    22 using System;
     22using HeuristicLab.Common.Resources;
     23using HeuristicLab.MainForm.WindowsForms;
    2324using System.Collections.Generic;
     25using System.Drawing;
     26using System.Linq;
    2427
    2528namespace HeuristicLab.OptimizationExpertSystem.Menu {
    2629  internal class SolutionSimilarityMenuItem : MenuItemBase {
     30    public override Image Image { get { return VSImageLibrary.Performance; } }
     31
    2732    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);
    2937    }
    3038
Note: See TracChangeset for help on using the changeset viewer.