Changeset 2960
- Timestamp:
- 03/07/10 23:44:47 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Optimizer/3.3
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimizer/3.3/FileManager.cs
r2958 r2960 103 103 public static void Save() { 104 104 IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView; 105 if ( (activeView != null) && (CreatableAttribute.IsCreatable(activeView.Content.GetType()))) {105 if (activeView != null) { 106 106 Save(activeView); 107 107 } … … 120 120 public static void SaveAs() { 121 121 IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView; 122 if ( (activeView != null) && (CreatableAttribute.IsCreatable(activeView.Content.GetType()))) {122 if (activeView != null) { 123 123 SaveAs(activeView); 124 124 } … … 156 156 var views = from v in MainFormManager.MainForm.Views 157 157 where v is IContentView 158 where CreatableAttribute.IsCreatable(((IContentView)v).Content.GetType())159 158 select v as IContentView; 160 159 -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveAllMenuItem.cs
r2958 r2960 50 50 var views = from v in MainFormManager.MainForm.Views 51 51 where v is IContentView 52 where CreatableAttribute.IsCreatable(((IContentView)v).Content.GetType())53 52 where ((v is ItemView) && ((ItemView)v).EnableFileOperations) || (!(v is ItemView)) 54 53 select v; -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveAsMenuItem.cs
r2958 r2960 47 47 protected override void OnActiveViewChanged(object sender, EventArgs e) { 48 48 IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView; 49 bool enable = ((activeView != null) && (CreatableAttribute.IsCreatable(activeView.Content.GetType())));49 bool enable = activeView != null; 50 50 ItemView itemView = MainFormManager.MainForm.ActiveView as ItemView; 51 51 if ((enable) && (itemView != null)) enable = itemView.EnableFileOperations; -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveMenuItem.cs
r2958 r2960 51 51 protected override void OnActiveViewChanged(object sender, EventArgs e) { 52 52 IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView; 53 bool enable = ((activeView != null) && (CreatableAttribute.IsCreatable(activeView.Content.GetType())));53 bool enable = activeView != null; 54 54 ItemView itemView = MainFormManager.MainForm.ActiveView as ItemView; 55 55 if ((enable) && (itemView != null)) enable = itemView.EnableFileOperations; -
trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/SaveAllToolBarItem.cs
r2958 r2960 49 49 var views = from v in MainFormManager.MainForm.Views 50 50 where v is IContentView 51 where CreatableAttribute.IsCreatable(((IContentView)v).Content.GetType())52 51 where ((v is ItemView) && ((ItemView)v).EnableFileOperations) || (!(v is ItemView)) 53 52 select v; -
trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/SaveToolBarItem.cs
r2958 r2960 47 47 protected override void OnActiveViewChanged(object sender, EventArgs e) { 48 48 IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView; 49 bool enable = ((activeView != null) && (CreatableAttribute.IsCreatable(activeView.Content.GetType())));49 bool enable = activeView != null; 50 50 ItemView itemView = MainFormManager.MainForm.ActiveView as ItemView; 51 51 if ((enable) && (itemView != null)) enable = itemView.EnableFileOperations;
Note: See TracChangeset
for help on using the changeset viewer.