Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/19/10 21:00:30 (15 years ago)
Author:
mkommend
Message:

implemented ContentViews and propagation of view state changes (ticket #982)

Location:
trunk/sources/HeuristicLab.Optimizer/3.3
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimizer/3.3/FileManager.cs

    r3177 r3416  
    108108    }
    109109    private static void Save(IContentView view) {
    110       if (view.SaveEnabled) {
     110      if (!view.Locked) {
    111111        if ((!files.ContainsKey(view)) || (!File.Exists(files[view].Filename))) {
    112112          SaveAs(view);
     
    127127    }
    128128    public static void SaveAs(IContentView view) {
    129       if (view.SaveEnabled) {
     129      if (!view.Locked) {
    130130        if (saveFileDialog == null) {
    131131          saveFileDialog = new SaveFileDialog();
  • trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/CopyToClipboardMenuItem.cs

    r3376 r3416  
    4848    protected override void OnActiveViewChanged(object sender, EventArgs e) {
    4949      ItemView activeView = MainFormManager.MainForm.ActiveView as ItemView;
    50       ToolStripItem.Enabled = (activeView != null) && (activeView.SaveEnabled);
     50      ToolStripItem.Enabled = (activeView != null) && (!activeView.Locked);
    5151    }
    5252
    5353    public override void Execute() {
    5454      ItemView activeView = MainFormManager.MainForm.ActiveView as ItemView;
    55       if ((activeView != null) && (activeView.SaveEnabled)) {
     55      if ((activeView != null) && (!activeView.Locked)) {
    5656        Clipboard<IItem> clipboard = ((OptimizerMainForm)MainFormManager.MainForm).Clipboard;
    5757        clipboard.AddItem((IItem)activeView.Content.Clone());
  • trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveAllMenuItem.cs

    r2961 r3416  
    4747    protected override void OnActiveViewChanged(object sender, EventArgs e) {
    4848      var views = from v in MainFormManager.MainForm.Views.OfType<IContentView>()
    49                   where v.SaveEnabled
     49                  where !v.Locked
    5050                  select v;
    5151      ToolStripItem.Enabled = views.FirstOrDefault() != null;
  • trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveAsMenuItem.cs

    r2961 r3416  
    4545    protected override void OnActiveViewChanged(object sender, EventArgs e) {
    4646      IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView;
    47       ToolStripItem.Enabled = (activeView != null) && (activeView.SaveEnabled);
     47      ToolStripItem.Enabled = (activeView != null) && (!activeView.Locked);
    4848    }
    4949
  • trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveMenuItem.cs

    r2961 r3416  
    4949    protected override void OnActiveViewChanged(object sender, EventArgs e) {
    5050      IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView;
    51       ToolStripItem.Enabled = (activeView != null) && (activeView.SaveEnabled);
     51      ToolStripItem.Enabled = (activeView != null) && (!activeView.Locked);
    5252    }
    5353
  • trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/SaveAllToolBarItem.cs

    r2961 r3416  
    4646    protected override void OnActiveViewChanged(object sender, EventArgs e) {
    4747      var views = from v in MainFormManager.MainForm.Views.OfType<IContentView>()
    48                   where v.SaveEnabled
     48                  where !v.Locked
    4949                  select v;
    5050      ToolStripItem.Enabled = views.FirstOrDefault() != null;
  • trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/SaveToolBarItem.cs

    r2961 r3416  
    4545    protected override void OnActiveViewChanged(object sender, EventArgs e) {
    4646      IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView;
    47       ToolStripItem.Enabled = (activeView != null) && (activeView.SaveEnabled);
     47      ToolStripItem.Enabled = (activeView != null) && (!activeView.Locked);
    4848    }
    4949
Note: See TracChangeset for help on using the changeset viewer.