- Timestamp:
- 06/08/16 15:29:05 (8 years ago)
- Location:
- stable
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 13567,13586
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Optimizer
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Optimizer merged: 13567,13586
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Optimizer/3.3/HeuristicLab.Optimizer-3.3.csproj
r13285 r13884 224 224 </ItemGroup> 225 225 <ItemGroup> 226 <None Include="app.config" /> 226 <None Include="app.config"> 227 <SubType>Designer</SubType> 228 </None> 227 229 <EmbeddedResource Include="Documents\FirstSteps.rtf" /> 228 230 <None Include="HeuristicLab.snk" /> -
stable/HeuristicLab.Optimizer/3.3/OptimizerDockingMainForm.cs
r12009 r13884 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(); -
stable/HeuristicLab.Optimizer/3.3/OptimizerMultipleDocumentMainForm.cs
r12009 r13884 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(); -
stable/HeuristicLab.Optimizer/3.3/OptimizerSingleDocumentMainForm.cs
r12009 r13884 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(); -
stable/HeuristicLab.Optimizer/3.3/Plugin.cs.frame
r13316 r13884 20 20 #endregion 21 21 22 using System.Drawing; 22 23 using System.Linq; 23 24 using System.Windows.Forms; … … 61 62 62 63 if (mainForm != null) { 64 if (CheckSavedMainFormSettings()) { 65 mainForm.Location = Settings.Default.MainFormLocation; 66 mainForm.Size = Settings.Default.MainFormSize; 67 mainForm.WindowState = Settings.Default.MainFormWindowState; 68 } 69 70 mainForm.FormClosing += (sender, eventArgs) => { 71 if (mainForm.WindowState != FormWindowState.Minimized) 72 Settings.Default.MainFormWindowState = mainForm.WindowState; 73 if (mainForm.WindowState != FormWindowState.Normal) { 74 Settings.Default.MainFormLocation = mainForm.RestoreBounds.Location; 75 Settings.Default.MainFormSize = mainForm.RestoreBounds.Size; 76 } else if (mainForm.WindowState == FormWindowState.Normal) { 77 Settings.Default.MainFormLocation = mainForm.Location; 78 Settings.Default.MainFormSize = mainForm.Size; 79 } 80 }; 81 82 63 83 ClientInformation.InitializeAsync(); 64 84 UserInformation.InitializeAsync(); … … 72 92 } 73 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 } 74 102 } 75 103 } -
stable/HeuristicLab.Optimizer/3.3/Properties/Settings.Designer.cs
r11920 r13884 2 2 // <auto-generated> 3 3 // This code was generated by a tool. 4 // Runtime Version:4.0.30319. 340144 // 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 … … 63 63 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 64 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 }72 }73 74 [global::System.Configuration.UserScopedSettingAttribute()]75 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]76 [global::System.Configuration.DefaultSettingValueAttribute("True")]77 65 public bool CollapseClipboard { 78 66 get { … … 107 95 } 108 96 } 97 98 [global::System.Configuration.UserScopedSettingAttribute()] 99 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 100 [global::System.Configuration.DefaultSettingValueAttribute("0, 0")] 101 public global::System.Drawing.Point MainFormLocation { 102 get { 103 return ((global::System.Drawing.Point)(this["MainFormLocation"])); 104 } 105 set { 106 this["MainFormLocation"] = value; 107 } 108 } 109 110 [global::System.Configuration.UserScopedSettingAttribute()] 111 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 112 [global::System.Configuration.DefaultSettingValueAttribute("0, 0")] 113 public global::System.Drawing.Size MainFormSize { 114 get { 115 return ((global::System.Drawing.Size)(this["MainFormSize"])); 116 } 117 set { 118 this["MainFormSize"] = value; 119 } 120 } 121 122 [global::System.Configuration.UserScopedSettingAttribute()] 123 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 124 [global::System.Configuration.DefaultSettingValueAttribute("Normal")] 125 public global::System.Windows.Forms.FormWindowState MainFormWindowState { 126 get { 127 return ((global::System.Windows.Forms.FormWindowState)(this["MainFormWindowState"])); 128 } 129 set { 130 this["MainFormWindowState"] = value; 131 } 132 } 109 133 } 110 134 } -
stable/HeuristicLab.Optimizer/3.3/Properties/Settings.settings
r6827 r13884 12 12 <Value Profile="(Default)">True</Value> 13 13 </Setting> 14 <Setting Name="ShowMaximized" Type="System.Boolean" Scope="User">15 <Value Profile="(Default)">True</Value>16 </Setting>17 14 <Setting Name="CollapseClipboard" Type="System.Boolean" Scope="User"> 18 15 <Value Profile="(Default)">True</Value> … … 24 21 <Value Profile="(Default)">DockingMainForm</Value> 25 22 </Setting> 23 <Setting Name="MainFormLocation" Type="System.Drawing.Point" Scope="User"> 24 <Value Profile="(Default)">0, 0</Value> 25 </Setting> 26 <Setting Name="MainFormSize" Type="System.Drawing.Size" Scope="User"> 27 <Value Profile="(Default)">0, 0</Value> 28 </Setting> 29 <Setting Name="MainFormWindowState" Type="System.Windows.Forms.FormWindowState" Scope="User"> 30 <Value Profile="(Default)">Normal</Value> 31 </Setting> 26 32 </Settings> 27 33 </SettingsFile> -
stable/HeuristicLab.Optimizer/3.3/app.config
r11920 r13884 17 17 <value>True</value> 18 18 </setting> 19 <setting name="ShowMaximized" serializeAs="String">20 <value>True</value>21 </setting>22 19 <setting name="CollapseClipboard" serializeAs="String"> 23 20 <value>True</value> … … 29 26 <value>DockingMainForm</value> 30 27 </setting> 28 <setting name="MainFormLocation" serializeAs="String"> 29 <value>0, 0</value> 30 </setting> 31 <setting name="MainFormSize" serializeAs="String"> 32 <value>0, 0</value> 33 </setting> 34 <setting name="MainFormWindowState" serializeAs="String"> 35 <value>Normal</value> 36 </setting> 31 37 </HeuristicLab.Optimizer.Properties.Settings> 32 38 </userSettings> -
stable/HeuristicLab.PluginInfrastructure/3.3/Properties/Settings.Designer.cs
r11920 r13884 2 2 // <auto-generated> 3 3 // This code was generated by a tool. 4 // Runtime Version:4.0.30319. 340144 // 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 public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 17 … … 83 83 } 84 84 } 85 86 [global::System.Configuration.UserScopedSettingAttribute()] 87 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 88 [global::System.Configuration.DefaultSettingValueAttribute("0, 0")] 89 public global::System.Drawing.Point StarterFormLocation { 90 get { 91 return ((global::System.Drawing.Point)(this["StarterFormLocation"])); 92 } 93 set { 94 this["StarterFormLocation"] = value; 95 } 96 } 97 98 [global::System.Configuration.UserScopedSettingAttribute()] 99 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 100 [global::System.Configuration.DefaultSettingValueAttribute("0, 0")] 101 public global::System.Drawing.Size StarterFormSize { 102 get { 103 return ((global::System.Drawing.Size)(this["StarterFormSize"])); 104 } 105 set { 106 this["StarterFormSize"] = value; 107 } 108 } 109 110 [global::System.Configuration.UserScopedSettingAttribute()] 111 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 112 [global::System.Configuration.DefaultSettingValueAttribute("Normal")] 113 public global::System.Windows.Forms.FormWindowState StarterFormWindowState { 114 get { 115 return ((global::System.Windows.Forms.FormWindowState)(this["StarterFormWindowState"])); 116 } 117 set { 118 this["StarterFormWindowState"] = value; 119 } 120 } 85 121 } 86 122 } -
stable/HeuristicLab.PluginInfrastructure/3.3/Properties/Settings.settings
r4495 r13884 18 18 <Value Profile="(Default)">http://services.heuristiclab.com/Deployment-3.3/AdminService.svc</Value> 19 19 </Setting> 20 <Setting Name="StarterFormLocation" Type="System.Drawing.Point" Scope="User"> 21 <Value Profile="(Default)">0, 0</Value> 22 </Setting> 23 <Setting Name="StarterFormSize" Type="System.Drawing.Size" Scope="User"> 24 <Value Profile="(Default)">0, 0</Value> 25 </Setting> 26 <Setting Name="StarterFormWindowState" Type="System.Windows.Forms.FormWindowState" Scope="User"> 27 <Value Profile="(Default)">Normal</Value> 28 </Setting> 20 29 </Settings> 21 30 </SettingsFile> -
stable/HeuristicLab.PluginInfrastructure/3.3/Starter/StarterForm.cs
r12009 r13884 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.Drawing; 24 25 using System.IO; 25 26 using System.Linq; … … 29 30 using HeuristicLab.PluginInfrastructure.Advanced; 30 31 using HeuristicLab.PluginInfrastructure.Manager; 32 using HeuristicLab.PluginInfrastructure.Properties; 31 33 32 34 namespace HeuristicLab.PluginInfrastructure.Starter { … … 67 69 splashScreen.Show(this, "Loading HeuristicLab..."); 68 70 71 if (CheckSavedStarterFormSettings()) { 72 Location = Settings.Default.StarterFormLocation; 73 Size = Settings.Default.StarterFormSize; 74 WindowState = Settings.Default.StarterFormWindowState; 75 } 76 69 77 pluginManager.DiscoverAndCheckPlugins(); 70 78 UpdateApplicationsList(); … … 96 104 splashScreen.Close(); 97 105 abortRequested = true; 106 107 if (WindowState != FormWindowState.Minimized) 108 Settings.Default.StarterFormWindowState = WindowState; 109 if (WindowState != FormWindowState.Normal) { 110 Settings.Default.StarterFormLocation = RestoreBounds.Location; 111 Settings.Default.StarterFormSize = RestoreBounds.Size; 112 } else if (WindowState == FormWindowState.Normal) { 113 Settings.Default.StarterFormLocation = Location; 114 Settings.Default.StarterFormSize = Size; 115 } 116 117 Settings.Default.Save(); 98 118 } 99 119 … … 177 197 178 198 #region Helpers 199 private bool CheckSavedStarterFormSettings() { 200 var formArea = new Rectangle(Settings.Default.StarterFormLocation, Settings.Default.StarterFormSize); 201 var screenArea = Screen.FromRectangle(formArea).WorkingArea; 202 var overlappingArea = Rectangle.Intersect(formArea, screenArea); 203 bool offLimits = overlappingArea.IsEmpty || overlappingArea.Width * overlappingArea.Height < formArea.Width * formArea.Height * 0.25; 204 return !formArea.IsEmpty && !offLimits; 205 } 206 179 207 private void UpdateApplicationsList() { 180 208 if (InvokeRequired) Invoke((Action)UpdateApplicationsList); -
stable/HeuristicLab.PluginInfrastructure/3.3/app.config
r11920 r13884 23 23 <setting name="UpdateLocationAdministrationAddress" serializeAs="String"> 24 24 <value>http://services.heuristiclab.com/Deployment-3.3/AdminService.svc</value> 25 </setting> 26 <setting name="StarterFormLocation" serializeAs="String"> 27 <value>0, 0</value> 28 </setting> 29 <setting name="StarterFormSize" serializeAs="String"> 30 <value>0, 0</value> 31 </setting> 32 <setting name="StarterFormWindowState" serializeAs="String"> 33 <value>Normal</value> 25 34 </setting> 26 35 </HeuristicLab.PluginInfrastructure.Properties.Settings>
Note: See TracChangeset
for help on using the changeset viewer.