Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/22/10 05:14:39 (15 years ago)
Author:
swagner
Message:

Worked on the refactoring of saving and loading items (#990)

Location:
trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems
Files:
2 edited

Legend:

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

    r3416 r3483  
    2424using System.Linq;
    2525using System.Windows.Forms;
     26using HeuristicLab.Common;
    2627using HeuristicLab.MainForm;
    2728
     
    4647    protected override void OnActiveViewChanged(object sender, EventArgs e) {
    4748      var views = from v in MainFormManager.MainForm.Views.OfType<IContentView>()
     49                  where v.Content != null
     50                  where v.Content is IStorableContent
    4851                  where !v.Locked
    4952                  select v;
  • trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/SaveToolBarItem.cs

    r3416 r3483  
    2323using System.Drawing;
    2424using System.Windows.Forms;
     25using HeuristicLab.Common;
    2526using HeuristicLab.MainForm;
    2627
     
    4546    protected override void OnActiveViewChanged(object sender, EventArgs e) {
    4647      IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView;
    47       ToolStripItem.Enabled = (activeView != null) && (!activeView.Locked);
     48      ToolStripItem.Enabled = (activeView != null) && (activeView.Content != null) &&
     49                              (activeView.Content is IStorableContent) && !activeView.Locked;
    4850    }
    4951
Note: See TracChangeset for help on using the changeset viewer.