Changeset 13586 for trunk/sources/HeuristicLab.Optimizer/3.3
- Timestamp:
- 02/04/16 13:28:04 (9 years ago)
- Location:
- trunk/sources/HeuristicLab.Optimizer/3.3
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimizer/3.3/OptimizerDockingMainForm.cs
r12012 r13586 80 80 startPage.Show(); 81 81 } 82 83 WindowState = Properties.Settings.Default.ShowMaximized ? FormWindowState.Maximized : FormWindowState.Normal;84 82 } 85 83 … … 93 91 protected override void OnClosed(EventArgs e) { 94 92 base.OnClosed(e); 95 Properties.Settings.Default.ShowMaximized = WindowState == FormWindowState.Maximized;96 93 Properties.Settings.Default.CollapseClipboard = clipboard.Collapsed; 97 94 OperatorsSidebar operatorsSidebar = MainFormManager.MainForm.Views.OfType<OperatorsSidebar>().FirstOrDefault(); -
trunk/sources/HeuristicLab.Optimizer/3.3/OptimizerMultipleDocumentMainForm.cs
r12012 r13586 80 80 startPage.Show(); 81 81 } 82 83 WindowState = Properties.Settings.Default.ShowMaximized ? FormWindowState.Maximized : FormWindowState.Normal;84 82 } 85 83 … … 93 91 protected override void OnClosed(EventArgs e) { 94 92 base.OnClosed(e); 95 Properties.Settings.Default.ShowMaximized = WindowState == FormWindowState.Maximized;96 93 Properties.Settings.Default.CollapseClipboard = clipboard.Collapsed; 97 94 OperatorsSidebar operatorsSidebar = MainFormManager.MainForm.Views.OfType<OperatorsSidebar>().FirstOrDefault(); -
trunk/sources/HeuristicLab.Optimizer/3.3/OptimizerSingleDocumentMainForm.cs
r12012 r13586 80 80 startPage.Show(); 81 81 } 82 83 WindowState = Properties.Settings.Default.ShowMaximized ? FormWindowState.Maximized : FormWindowState.Normal;84 82 } 85 83 … … 93 91 protected override void OnClosed(EventArgs e) { 94 92 base.OnClosed(e); 95 Properties.Settings.Default.ShowMaximized = WindowState == FormWindowState.Maximized;96 93 Properties.Settings.Default.CollapseClipboard = clipboard.Collapsed; 97 94 OperatorsSidebar operatorsSidebar = MainFormManager.MainForm.Views.OfType<OperatorsSidebar>().FirstOrDefault(); -
trunk/sources/HeuristicLab.Optimizer/3.3/Plugin.cs.frame
r13567 r13586 20 20 #endregion 21 21 22 using System.Drawing; 22 23 using System.Linq; 23 24 using System.Windows.Forms; … … 60 61 } 61 62 62 if (mainForm != null) { 63 mainForm.Location = Settings.Default.MainFormLocation;64 mainForm.Size = Settings.Default.MainFormSize;65 mainForm.Load += (sender, eventArgs) => {63 if (mainForm != null) { 64 if (CheckSavedMainFormSettings()) { 65 mainForm.Location = Settings.Default.MainFormLocation; 66 mainForm.Size = Settings.Default.MainFormSize; 66 67 mainForm.WindowState = Settings.Default.MainFormWindowState; 67 } ;68 } 68 69 69 70 mainForm.FormClosing += (sender, eventArgs) => { 70 Settings.Default.MainFormWindowState = mainForm.WindowState; 71 if (mainForm.WindowState != FormWindowState.Minimized) 72 Settings.Default.MainFormWindowState = mainForm.WindowState; 71 73 if (mainForm.WindowState != FormWindowState.Normal) { 72 74 Settings.Default.MainFormLocation = mainForm.RestoreBounds.Location; … … 90 92 } 91 93 } 94 95 private bool CheckSavedMainFormSettings() { 96 var formArea = new Rectangle(Settings.Default.MainFormLocation, Settings.Default.MainFormSize); 97 var screenArea = Screen.FromRectangle(formArea).WorkingArea; 98 var overlappingArea = Rectangle.Intersect(formArea, screenArea); 99 bool offLimits = overlappingArea.IsEmpty || overlappingArea.Width * overlappingArea.Height < formArea.Width * formArea.Height * 0.25; 100 return !formArea.IsEmpty && !offLimits; 101 } 92 102 } 93 103 } -
trunk/sources/HeuristicLab.Optimizer/3.3/Properties/Settings.Designer.cs
r13567 r13586 2 2 // <auto-generated> 3 3 // This code was generated by a tool. 4 // Runtime Version:4.0.30319. 342094 // Runtime Version:4.0.30319.42000 5 5 // 6 6 // Changes to this file may cause incorrect behavior and will be lost if … … 13 13 14 14 [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "1 2.0.0.0")]15 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] 16 16 internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 17 … … 57 57 set { 58 58 this["ShowClipboard"] = value; 59 }60 }61 62 [global::System.Configuration.UserScopedSettingAttribute()]63 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]64 [global::System.Configuration.DefaultSettingValueAttribute("True")]65 public bool ShowMaximized {66 get {67 return ((bool)(this["ShowMaximized"]));68 }69 set {70 this["ShowMaximized"] = value;71 59 } 72 60 } -
trunk/sources/HeuristicLab.Optimizer/3.3/Properties/Settings.settings
r13567 r13586 10 10 </Setting> 11 11 <Setting Name="ShowClipboard" Type="System.Boolean" Scope="User"> 12 <Value Profile="(Default)">True</Value>13 </Setting>14 <Setting Name="ShowMaximized" Type="System.Boolean" Scope="User">15 12 <Value Profile="(Default)">True</Value> 16 13 </Setting> -
trunk/sources/HeuristicLab.Optimizer/3.3/app.config
r13567 r13586 15 15 </setting> 16 16 <setting name="ShowClipboard" serializeAs="String"> 17 <value>True</value>18 </setting>19 <setting name="ShowMaximized" serializeAs="String">20 17 <value>True</value> 21 18 </setting>
Note: See TracChangeset
for help on using the changeset viewer.