Added default values to window size and location.

There was a silent exception thrown when reading the window location the first
time the application was launched.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
Konstantina Chremmou 2020-10-19 16:11:31 +01:00
parent 61d77cada4
commit fd6b7b4b48
3 changed files with 12 additions and 4 deletions

View File

@ -12,7 +12,7 @@ namespace XenAdmin.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.6.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.7.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@ -116,6 +116,7 @@ namespace XenAdmin.Properties {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("1024, 769")]
[global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public global::System.Drawing.Size WindowSize {
get {
@ -128,6 +129,7 @@ namespace XenAdmin.Properties {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("150, 20")]
[global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public global::System.Drawing.Point WindowLocation {
get {

View File

@ -25,10 +25,10 @@
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="WindowSize" Roaming="true" Type="System.Drawing.Size" Scope="User">
<Value Profile="(Default)" />
<Value Profile="(Default)">1024, 769</Value>
</Setting>
<Setting Name="WindowLocation" Roaming="true" Type="System.Drawing.Point" Scope="User">
<Value Profile="(Default)" />
<Value Profile="(Default)">150, 20</Value>
</Setting>
<Setting Name="RequirePass" Roaming="true" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
@ -201,4 +201,4 @@
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>
</SettingsFile>

View File

@ -30,6 +30,12 @@
<setting name="UserTemplatesVisible" serializeAs="String">
<value>True</value>
</setting>
<setting name="WindowSize" serializeAs="String">
<value>1024, 769</value>
</setting>
<setting name="WindowLocation" serializeAs="String">
<value>150, 20</value>
</setting>
<setting name="RequirePass" serializeAs="String">
<value>False</value>
</setting>