Free cookie consent management tool by TermsFeed Policy Generator

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

#2457: worked on expert-system

File:
1 copied

Legend:

Unmodified
Added
Removed
  • branches/PerformanceComparison/HeuristicLab.OptimizationExpertSystem/3.3/Menu/900_Tools/990_ShowAllInOneViewMenuItem.cs

    r13719 r13720  
    2020#endregion
    2121
    22 using HeuristicLab.Common;
    23 using HeuristicLab.MainForm;
    24 using HeuristicLab.Scripting;
    25 using System;
    2622using System.Collections.Generic;
    27 using System.Windows.Forms;
    2823
    2924namespace HeuristicLab.OptimizationExpertSystem.Menu {
    30   internal class SaveCSharpScriptMenuItem : MenuItemBase {
    31     protected override void OnActiveViewChanged(object sender, EventArgs e) {
    32       base.OnActiveViewChanged(sender, e);
    33       var contentView = MainForm.ActiveView as IContentView;
    34       ToolStripItem.Enabled = (contentView != null && contentView.Content is CSharpScript);
    35     }
    36 
     25  internal class ShowAllInOneViewMenuItem : MenuItemBase {
    3726    public override void Execute() {
    38       using (var dialog = new SaveFileDialog()) {
    39         dialog.Filter = "HL Files|*.hl";
    40         if (dialog.ShowDialog(MainForm) != DialogResult.OK) return;
    41         ContentManager.Save((CSharpScript)((IContentView)MainForm.ActiveView).Content, dialog.FileName, true);
    42       }
     27      MainForm.ShowContent(MainForm.ExpertSystem, typeof(ExpertSystemView));
    4328    }
    4429
    4530    public override IEnumerable<string> Structure {
    46       get { return new[] { "Tools", "C# Script" }; }
     31      get { return new[] { "Tools" }; }
    4732    }
    4833
    4934    public override string Name {
    50       get { return "Save"; }
     35      get { return "All-In-One View"; }
    5136    }
    5237
    5338    public override int Position {
    54       get { return 930; }
     39      get { return 990; }
    5540    }
    5641  }
Note: See TracChangeset for help on using the changeset viewer.