Changeset 3571
- Timestamp:
- 04/30/10 13:07:31 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core.Views/3.3/Clipboard.cs
r3557 r3571 31 31 namespace HeuristicLab.Core.Views { 32 32 [View("Clipboard")] 33 public sealed partial class Clipboard<T> : HeuristicLab.MainForm.WindowsForms. Viewwhere T : class, IItem {33 public sealed partial class Clipboard<T> : HeuristicLab.MainForm.WindowsForms.Sidebar where T : class, IItem { 34 34 private TypeSelectorDialog typeSelectorDialog; 35 35 private Dictionary<T, ListViewItem> itemListViewItemTable; … … 82 82 SetEnabledStateOfControls(); 83 83 } 84 protected override void OnClosing(FormClosingEventArgs e) {85 base.OnClosing(e);86 if (e.CloseReason == CloseReason.UserClosing) {87 e.Cancel = true;88 this.Hide();89 }90 }91 84 92 85 private void SetEnabledStateOfControls() { -
trunk/sources/HeuristicLab.Core.Views/3.3/OperatorsSidebar.cs
r3190 r3571 26 26 namespace HeuristicLab.Core.Views { 27 27 [View("Operators Sidebar")] 28 public partial class OperatorsSidebar : HeuristicLab.MainForm.WindowsForms. View{28 public partial class OperatorsSidebar : HeuristicLab.MainForm.WindowsForms.Sidebar { 29 29 public OperatorsSidebar() { 30 30 InitializeComponent(); … … 35 35 typeSelector.Configure(typeof(IOperator), false, false); 36 36 } 37 protected override void OnClosing(FormClosingEventArgs e) {38 base.OnClosing(e);39 if (e.CloseReason == CloseReason.UserClosing) {40 e.Cancel = true;41 this.Hide();42 }43 }44 37 } 45 38 } -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/DockForm.cs
r3437 r3571 53 53 break; 54 54 } 55 if (view is Sidebar) 56 this.DockAreas = DockAreas.DockLeft | DockAreas.DockRight; 57 55 58 Type viewType = view.GetType(); 56 59 Control control = (Control)view; -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/HeuristicLab.MainForm.WindowsForms-3.3.csproj
r3477 r3571 112 112 <DependentUpon>DockingMainForm.cs</DependentUpon> 113 113 </Compile> 114 <Compile Include="Sidebar.cs"> 115 <SubType>UserControl</SubType> 116 </Compile> 117 <Compile Include="Sidebar.Designer.cs"> 118 <DependentUpon>Sidebar.cs</DependentUpon> 119 </Compile> 114 120 <Compile Include="DocumentForm.cs"> 115 121 <SubType>Form</SubType> -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/CloseAllMenuItem.cs
r3498 r3571 25 25 using System.Windows.Forms; 26 26 using HeuristicLab.MainForm; 27 using HeuristicLab.MainForm.WindowsForms; 27 28 28 29 namespace HeuristicLab.Optimizer.MenuItems { … … 42 43 } 43 44 protected override void OnActiveViewChanged(object sender, EventArgs e) { 44 ToolStripItem.Enabled = MainFormManager.MainForm.Views.Any<IView>(v => v.IsShown );45 ToolStripItem.Enabled = MainFormManager.MainForm.Views.Any<IView>(v => v.IsShown && !(v is Sidebar)); 45 46 } 46 47 47 48 public override void Execute() { 48 MainFormManager.MainForm.CloseAllViews(); 49 foreach (IView view in MainFormManager.MainForm.Views) 50 if (!(view is Sidebar)) 51 view.Close(); 49 52 } 50 53 } -
trunk/sources/HeuristicLab.Optimizer/3.3/MenuItems/CloseMenuItem.cs
r3498 r3571 24 24 using System.Windows.Forms; 25 25 using HeuristicLab.MainForm; 26 using HeuristicLab.MainForm.WindowsForms; 26 27 27 28 namespace HeuristicLab.Optimizer.MenuItems { … … 41 42 } 42 43 protected override void OnActiveViewChanged(object sender, EventArgs e) { 43 ToolStripItem.Enabled = MainFormManager.MainForm.ActiveView != null; 44 IView view = MainFormManager.MainForm.ActiveView; 45 ToolStripItem.Enabled = !(view is Sidebar); 44 46 } 45 47 46 48 public override void Execute() { 47 MainFormManager.MainForm.ActiveView.Close(); 49 IView view = MainFormManager.MainForm.ActiveView; 50 if (!(view is Sidebar)) 51 view.Close(); 48 52 } 49 53 }
Note: See TracChangeset
for help on using the changeset viewer.