Changeset 3518 for trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems
- Timestamp:
- 04/24/10 01:05:55 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/CopyToClipboardMenuItem.cs
r3483 r3518 44 44 } 45 45 protected override void OnActiveViewChanged(object sender, EventArgs e) { 46 I temView activeView = MainFormManager.MainForm.ActiveView as ItemView;47 ToolStripItem.Enabled = (activeView != null) && (activeView.Content != null) && !activeView.Locked;46 IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView; 47 ToolStripItem.Enabled = (activeView != null) && (activeView.Content != null) && (activeView.Content is IItem) && !activeView.Locked; 48 48 } 49 49 50 50 public override void Execute() { 51 I temView activeView = MainFormManager.MainForm.ActiveView as ItemView;52 if ((activeView != null) && (activeView.Content != null) && !activeView.Locked) {51 IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView; 52 if ((activeView != null) && (activeView.Content != null) && (activeView.Content is IItem) && !activeView.Locked) { 53 53 Clipboard<IItem> clipboard = ((OptimizerMainForm)MainFormManager.MainForm).Clipboard; 54 clipboard.AddItem((IItem)activeView.Content.Clone()); 54 IItem content = (IItem)activeView.Content; 55 clipboard.AddItem((IItem)content.Clone()); 55 56 } 56 57 }
Note: See TracChangeset
for help on using the changeset viewer.