Changeset 2958 for trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems
- Timestamp:
- 03/07/10 06:40:15 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/SaveAllToolBarItem.cs
r2796 r2958 25 25 using System.Windows.Forms; 26 26 using HeuristicLab.Core; 27 using HeuristicLab.Core.Views; 27 28 using HeuristicLab.MainForm; 28 29 … … 49 50 where v is IContentView 50 51 where CreatableAttribute.IsCreatable(((IContentView)v).Content.GetType()) 52 where ((v is ItemView) && ((ItemView)v).EnableFileOperations) || (!(v is ItemView)) 51 53 select v; 52 54 ToolStripItem.Enabled = views.FirstOrDefault() != null; -
trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/SaveToolBarItem.cs
r2796 r2958 24 24 using System.Windows.Forms; 25 25 using HeuristicLab.Core; 26 using HeuristicLab.Core.Views; 26 27 using HeuristicLab.MainForm; 27 28 … … 46 47 protected override void OnActiveViewChanged(object sender, EventArgs e) { 47 48 IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView; 48 ToolStripItem.Enabled = ((activeView != null) && (CreatableAttribute.IsCreatable(activeView.Content.GetType()))); 49 bool enable = ((activeView != null) && (CreatableAttribute.IsCreatable(activeView.Content.GetType()))); 50 ItemView itemView = MainFormManager.MainForm.ActiveView as ItemView; 51 if ((enable) && (itemView != null)) enable = itemView.EnableFileOperations; 52 ToolStripItem.Enabled = enable; 49 53 } 50 54
Note: See TracChangeset
for help on using the changeset viewer.