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

File:
1 moved

Legend:

Unmodified
Added
Removed
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Menu/300_Learning/310_KnowledgeBaseMenuItem.cs

    r13719 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 AlgorithmInstancesMenuItem : MenuItemBase {
    27     public override void Execute() {
    28       throw new NotImplementedException();
     30    public override Image Image { get { return VSImageLibrary.Library; } }
     31
     32    public override string Name {
     33      get { return "Knowledge Base"; }
    2934    }
    3035
     
    3338    }
    3439
    35     public override string Name {
    36       get { return "Algorithm Instances"; }
    37     }
    38 
    3940    public override int Position {
    4041      get { return 310; }
    4142    }
     43
     44    public override string ToolTipText { get { return "Study previously conducted runs on problem instances of the same class that are stored in the OKB."; } }
     45
     46    public override void Execute() {
     47      var viewType = typeof(KnowledgeBaseView);
     48      var view = MainForm.Views.FirstOrDefault(x => viewType == ((x is ViewHost) ? ((ViewHost)x).ActiveView : x).GetType());
     49      if (view != null) view.Show();
     50      else MainForm.ShowContent(MainForm.ExpertSystem, viewType);
     51    }
    4252  }
    4353}
Note: See TracChangeset for help on using the changeset viewer.