Changeset 3416 for trunk/sources/HeuristicLab.Optimizer/3.3
- Timestamp:
- 04/19/10 21:00:30 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Optimizer/3.3
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimizer/3.3/FileManager.cs
r3177 r3416 108 108 } 109 109 private static void Save(IContentView view) { 110 if ( view.SaveEnabled) {110 if (!view.Locked) { 111 111 if ((!files.ContainsKey(view)) || (!File.Exists(files[view].Filename))) { 112 112 SaveAs(view); … … 127 127 } 128 128 public static void SaveAs(IContentView view) { 129 if ( view.SaveEnabled) {129 if (!view.Locked) { 130 130 if (saveFileDialog == null) { 131 131 saveFileDialog = new SaveFileDialog(); -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/CopyToClipboardMenuItem.cs
r3376 r3416 48 48 protected override void OnActiveViewChanged(object sender, EventArgs e) { 49 49 ItemView activeView = MainFormManager.MainForm.ActiveView as ItemView; 50 ToolStripItem.Enabled = (activeView != null) && ( activeView.SaveEnabled);50 ToolStripItem.Enabled = (activeView != null) && (!activeView.Locked); 51 51 } 52 52 53 53 public override void Execute() { 54 54 ItemView activeView = MainFormManager.MainForm.ActiveView as ItemView; 55 if ((activeView != null) && ( activeView.SaveEnabled)) {55 if ((activeView != null) && (!activeView.Locked)) { 56 56 Clipboard<IItem> clipboard = ((OptimizerMainForm)MainFormManager.MainForm).Clipboard; 57 57 clipboard.AddItem((IItem)activeView.Content.Clone()); -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveAllMenuItem.cs
r2961 r3416 47 47 protected override void OnActiveViewChanged(object sender, EventArgs e) { 48 48 var views = from v in MainFormManager.MainForm.Views.OfType<IContentView>() 49 where v.SaveEnabled49 where !v.Locked 50 50 select v; 51 51 ToolStripItem.Enabled = views.FirstOrDefault() != null; -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveAsMenuItem.cs
r2961 r3416 45 45 protected override void OnActiveViewChanged(object sender, EventArgs e) { 46 46 IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView; 47 ToolStripItem.Enabled = (activeView != null) && ( activeView.SaveEnabled);47 ToolStripItem.Enabled = (activeView != null) && (!activeView.Locked); 48 48 } 49 49 -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveMenuItem.cs
r2961 r3416 49 49 protected override void OnActiveViewChanged(object sender, EventArgs e) { 50 50 IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView; 51 ToolStripItem.Enabled = (activeView != null) && ( activeView.SaveEnabled);51 ToolStripItem.Enabled = (activeView != null) && (!activeView.Locked); 52 52 } 53 53 -
trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/SaveAllToolBarItem.cs
r2961 r3416 46 46 protected override void OnActiveViewChanged(object sender, EventArgs e) { 47 47 var views = from v in MainFormManager.MainForm.Views.OfType<IContentView>() 48 where v.SaveEnabled48 where !v.Locked 49 49 select v; 50 50 ToolStripItem.Enabled = views.FirstOrDefault() != null; -
trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/SaveToolBarItem.cs
r2961 r3416 45 45 protected override void OnActiveViewChanged(object sender, EventArgs e) { 46 46 IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView; 47 ToolStripItem.Enabled = (activeView != null) && ( activeView.SaveEnabled);47 ToolStripItem.Enabled = (activeView != null) && (!activeView.Locked); 48 48 } 49 49
Note: See TracChangeset
for help on using the changeset viewer.