- Timestamp:
- 01/28/10 21:28:07 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core.Views/3.3/ItemCollectionView.cs
r2694 r2708 156 156 T item = (T)itemsListView.SelectedItems[0].Tag; 157 157 IView view = MainFormManager.CreateDefaultView(item); 158 if (view != null) MainFormManager.MainForm.ShowView(view);158 if (view != null) view.Show(); 159 159 } 160 160 } -
trunk/sources/HeuristicLab.Core.Views/3.3/ItemListView.cs
r2694 r2708 186 186 T item = (T)itemsListView.SelectedItems[0].Tag; 187 187 IView view = MainFormManager.CreateDefaultView(item); 188 if (view != null) MainFormManager.MainForm.ShowView(view);188 if (view != null) view.Show(); 189 189 } 190 190 } -
trunk/sources/HeuristicLab.Core.Views/3.3/ObjectView.cs
r2676 r2708 35 35 /// Base class for all visual representations. 36 36 /// </summary> 37 public partial class ObjectView : ViewBase, IObjectView {37 public partial class ObjectView : HeuristicLab.MainForm.WindowsForms.View, IObjectView { 38 38 private object obj; 39 39 /// <summary> -
trunk/sources/HeuristicLab.Core.Views/3.3/OperatorTreeView.cs
r2694 r2708 366 366 private void viewToolStripMenuItem_Click(object sender, EventArgs e) { 367 367 IView view = ((ToolStripMenuItem)sender).Tag as IView; 368 if (view != null) MainFormManager.MainForm.ShowView(view);368 if (view != null) view.Show(); 369 369 } 370 370 private void breakpointToolStripMenuItem_Click(object sender, EventArgs e) { -
trunk/sources/HeuristicLab.Core.Views/3.3/OperatorsSidebar.cs
r2676 r2708 31 31 using HeuristicLab.MainForm.WindowsForms; 32 32 33 namespace HeuristicLab.Core.Views { 34 public partial class OperatorsSidebar : ViewBase{33 namespace HeuristicLab.Core.Views { 34 public partial class OperatorsSidebar : HeuristicLab.MainForm.WindowsForms.View { 35 35 public OperatorsSidebar() { 36 36 InitializeComponent(); … … 41 41 } 42 42 43 p ublic override void OnClosing(object sender, CancelEventArgs e) {44 base.OnClosing( sender,e);43 protected override void OnClosing(FormClosingEventArgs e) { 44 base.OnClosing(e); 45 45 e.Cancel = true; 46 MainFormManager.MainForm.HideView(this);46 this.Hide(); 47 47 } 48 48 } -
trunk/sources/HeuristicLab.Core.Views/3.3/ViewHost.cs
r2694 r2708 98 98 99 99 private void viewsLabel_DoubleClick(object sender, EventArgs e) { 100 MainFormManager. MainForm.ShowView(MainFormManager.CreateView(viewPanel.Tag.GetType(), Object));100 MainFormManager.CreateView(viewPanel.Tag.GetType(), Object).Show(); 101 101 } 102 102 protected void contextMenuStrip_ItemClicked(object sender, ToolStripItemClickedEventArgs e) { -
trunk/sources/HeuristicLab.Optimizer/3.3/FileManager.cs
r2665 r2708 60 60 newDocumentsCounter++; 61 61 } 62 MainFormManager.MainForm.ShowView(view);62 view.Show(); 63 63 } 64 64 } … … 197 197 view.Caption = Path.GetFileName(filename); 198 198 files.Add(view, new FileInfo(filename)); 199 MainFormManager.MainForm.ShowView(view);199 view.Show(); 200 200 } 201 201 }); -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/CloseAllMenuItem.cs
r2546 r2708 10 10 11 11 namespace HeuristicLab.Optimizer.MenuItems { 12 internal class CloseAllMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem Base, IOptimizerUserInterfaceItemProvider {12 internal class CloseAllMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider { 13 13 public override string Name { 14 14 get { return "Clos&e All"; } … … 20 20 get { return 1700; } 21 21 } 22 public override ToolStripItemDisplayStyle ToolStripItemDisplayStyle { 23 get { return ToolStripItemDisplayStyle.Text; } 24 } 22 25 23 p ublic override void MainFormInitialized(object sender,EventArgs e) {26 protected override void OnToolStripItemSet(EventArgs e) { 24 27 ToolStripItem.Enabled = false; 25 28 } 26 p ublic override voidActiveViewChanged(object sender, EventArgs e) {29 protected override void OnActiveViewChanged(object sender, EventArgs e) { 27 30 ToolStripItem.Enabled = MainFormManager.MainForm.Views.FirstOrDefault() != null; 28 31 } -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/CloseMenuItem.cs
r2546 r2708 10 10 11 11 namespace HeuristicLab.Optimizer.MenuItems { 12 internal class CloseMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem Base, IOptimizerUserInterfaceItemProvider {12 internal class CloseMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider { 13 13 public override string Name { 14 14 get { return "&Close"; } … … 20 20 get { return 1600; } 21 21 } 22 public override ToolStripItemDisplayStyle ToolStripItemDisplayStyle { 23 get { return ToolStripItemDisplayStyle.Text; } 24 } 22 25 23 p ublic override void MainFormInitialized(object sender,EventArgs e) {26 protected override void OnToolStripItemSet(EventArgs e) { 24 27 ToolStripItem.Enabled = false; 25 28 } 26 p ublic override voidActiveViewChanged(object sender, EventArgs e) {29 protected override void OnActiveViewChanged(object sender, EventArgs e) { 27 30 ToolStripItem.Enabled = MainFormManager.MainForm.Views.FirstOrDefault() != null; 28 31 } 29 32 30 33 public override void Execute() { 31 MainFormManager.MainForm. CloseView(MainFormManager.MainForm.ActiveView);34 MainFormManager.MainForm.ActiveView.Close(); 32 35 } 33 36 } -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/ExitMenuItem.cs
r2546 r2708 10 10 11 11 namespace HeuristicLab.Optimizer.MenuItems { 12 internal class ExitMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem Base, IOptimizerUserInterfaceItemProvider {12 internal class ExitMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider { 13 13 public override IEnumerable<string> Structure { 14 14 get { return new string[] { "&File" }; } … … 19 19 public override int Position { 20 20 get { return 1999; } 21 } 22 public override ToolStripItemDisplayStyle ToolStripItemDisplayStyle { 23 get { return ToolStripItemDisplayStyle.Text; } 21 24 } 22 25 public override Keys ShortCutKeys { -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/NewMenuItem.cs
r2546 r2708 9 9 10 10 namespace HeuristicLab.Optimizer.MenuItems { 11 internal class NewMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem Base, IOptimizerUserInterfaceItemProvider {11 internal class NewMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider { 12 12 public override string Name { 13 13 get { return "&New..."; } -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/OpenMenuItem.cs
r2546 r2708 9 9 10 10 namespace HeuristicLab.Optimizer.MenuItems { 11 internal class OpenMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem Base, IOptimizerUserInterfaceItemProvider {11 internal class OpenMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider { 12 12 public override string Name { 13 13 get { return "&Open..."; } -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/OperatorsMenuItem.cs
r2656 r2708 12 12 13 13 namespace HeuristicLab.Optimizer.MenuItems { 14 internal class OperatorsMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem Base, IOptimizerUserInterfaceItemProvider {14 internal class OperatorsMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider { 15 15 private OperatorsSidebar view; 16 16 private ToolStripMenuItem menuItem; … … 29 29 } 30 30 31 p ublic override void MainFormInitialized(object sender,EventArgs e) {31 protected override void OnToolStripItemSet(EventArgs e) { 32 32 view = new OperatorsSidebar(); 33 33 view.Dock = DockStyle.Left; … … 39 39 menuItem.CheckOnClick = true; 40 40 } 41 MainFormManager.MainForm.ShowView(view);41 view.Show(); 42 42 } 43 43 … … 50 50 if (menuItem != null) { 51 51 if (menuItem.Checked) 52 MainFormManager.MainForm.ShowView(view);52 view.Show(); 53 53 else 54 MainFormManager.MainForm.HideView(view);54 view.Hide(); 55 55 } else { 56 MainFormManager.MainForm.ShowView(view);56 view.Show(); 57 57 } 58 58 } -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveAllMenuItem.cs
r2656 r2708 12 12 13 13 namespace HeuristicLab.Optimizer.MenuItems { 14 internal class SaveAllMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem Base, IOptimizerUserInterfaceItemProvider {14 internal class SaveAllMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider { 15 15 public override string Name { 16 16 get { return "Save Al&l"; } … … 29 29 } 30 30 31 p ublic override void MainFormInitialized(object sender,EventArgs e) {31 protected override void OnToolStripItemSet(EventArgs e) { 32 32 ToolStripItem.Enabled = false; 33 33 } 34 p ublic override voidActiveViewChanged(object sender, EventArgs e) {34 protected override void OnActiveViewChanged(object sender, EventArgs e) { 35 35 var views = from v in MainFormManager.MainForm.Views 36 36 where v is IObjectView -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveAsMenuItem.cs
r2656 r2708 12 12 13 13 namespace HeuristicLab.Optimizer.MenuItems { 14 internal class SaveAsMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem Base, IOptimizerUserInterfaceItemProvider {14 internal class SaveAsMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider { 15 15 public override string Name { 16 16 get { return "Save &As..."; } … … 29 29 } 30 30 31 p ublic override void MainFormInitialized(object sender,EventArgs e) {31 protected override void OnToolStripItemSet(EventArgs e) { 32 32 ToolStripItem.Enabled = false; 33 33 } 34 p ublic override voidActiveViewChanged(object sender, EventArgs e) {34 protected override void OnActiveViewChanged(object sender, EventArgs e) { 35 35 IObjectView activeView = MainFormManager.MainForm.ActiveView as IObjectView; 36 36 ToolStripItem.Enabled = ((activeView != null) && (CreatableAttribute.IsCreatable(activeView.Object.GetType()))); -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/SaveMenuItem.cs
r2656 r2708 12 12 13 13 namespace HeuristicLab.Optimizer.MenuItems { 14 internal class SaveMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem Base, IOptimizerUserInterfaceItemProvider {14 internal class SaveMenuItem : HeuristicLab.MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider { 15 15 public override string Name { 16 16 get { return "&Save"; } … … 32 32 } 33 33 34 p ublic override void MainFormInitialized(object sender,EventArgs e) {34 protected override void OnToolStripItemSet(EventArgs e) { 35 35 ToolStripItem.Enabled = false; 36 36 } 37 p ublic override voidActiveViewChanged(object sender, EventArgs e) {37 protected override void OnActiveViewChanged(object sender, EventArgs e) { 38 38 IObjectView activeView = MainFormManager.MainForm.ActiveView as IObjectView; 39 39 ToolStripItem.Enabled = ((activeView != null) && (CreatableAttribute.IsCreatable(activeView.Object.GetType()))); -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/Separators.cs
r2546 r2708 10 10 11 11 namespace HeuristicLab.Optimizer.MenuItems { 12 internal class SeparatorMenuItem : MenuSeparatorItem Base, IOptimizerUserInterfaceItemProvider {12 internal class SeparatorMenuItem : MenuSeparatorItem, IOptimizerUserInterfaceItemProvider { 13 13 public override IEnumerable<string> Structure { 14 14 get { return new string[] { "&File" }; } -
trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/NewToolBarItem.cs
r2546 r2708 10 10 11 11 namespace HeuristicLab.Optimizer { 12 internal class NewToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItem Base, IOptimizerUserInterfaceItemProvider {12 internal class NewToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItem, IOptimizerUserInterfaceItemProvider { 13 13 public override string Name { 14 14 get { return "New..."; } -
trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/OpenToolBarItem.cs
r2546 r2708 10 10 11 11 namespace HeuristicLab.Optimizer { 12 internal class OpenToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItem Base, IOptimizerUserInterfaceItemProvider {12 internal class OpenToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItem, IOptimizerUserInterfaceItemProvider { 13 13 public override string Name { 14 14 get { return "Open..."; } -
trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/SaveAllToolBarItem.cs
r2656 r2708 12 12 13 13 namespace HeuristicLab.Optimizer { 14 internal class SaveAllToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItem Base, IOptimizerUserInterfaceItemProvider {14 internal class SaveAllToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItem, IOptimizerUserInterfaceItemProvider { 15 15 public override string Name { 16 16 get { return "Save All"; } … … 26 26 } 27 27 28 p ublic override void MainFormInitialized(object sender,EventArgs e) {28 protected override void OnToolStripItemSet(EventArgs e) { 29 29 ToolStripItem.Enabled = false; 30 30 } 31 p ublic override voidActiveViewChanged(object sender, EventArgs e) {31 protected override void OnActiveViewChanged(object sender, EventArgs e) { 32 32 var views = from v in MainFormManager.MainForm.Views 33 33 where v is IObjectView -
trunk/sources/HeuristicLab.Optimizer/3.3/ToolBarItems/SaveToolBarItem.cs
r2656 r2708 12 12 13 13 namespace HeuristicLab.Optimizer { 14 internal class SaveToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItem Base, IOptimizerUserInterfaceItemProvider {14 internal class SaveToolBarItem : HeuristicLab.MainForm.WindowsForms.ToolBarItem, IOptimizerUserInterfaceItemProvider { 15 15 public override string Name { 16 16 get { return "Save"; } … … 26 26 } 27 27 28 p ublic override void MainFormInitialized(object sender,EventArgs e) {28 protected override void OnToolStripItemSet(EventArgs e) { 29 29 ToolStripItem.Enabled = false; 30 30 } 31 p ublic override voidActiveViewChanged(object sender, EventArgs e) {31 protected override void OnActiveViewChanged(object sender, EventArgs e) { 32 32 IObjectView activeView = MainFormManager.MainForm.ActiveView as IObjectView; 33 33 ToolStripItem.Enabled = ((activeView != null) && (CreatableAttribute.IsCreatable(activeView.Object.GetType())));
Note: See TracChangeset
for help on using the changeset viewer.