diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 000000000..f5fe91ac1 --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,20 @@ + + + $(Title) + $(Description) + Copyright � XCP-ng + git + https://github.com/xcp-ng/xenadmin + $([System.DateTime]::Now.ToString("yy"))$([System.DateTime]::Now.DayOfYear.ToString("D3")) + XCP-ng + XCP-ng Center + 0.0.0.$(RevisionNumber) + 0.0.0.$(RevisionNumber) + Medicine Hat + xcpngcenter_main + + + + ../Packages + + diff --git a/Directory.Build.targets b/Directory.Build.targets index 6bbd8d19a..9b1eccb5f 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,18 +1,16 @@ - - - + + + - - - + + + - - - + + + false @@ -72,26 +70,6 @@ internal partial class ThisAssembly - + - - - $(Title) - $(Description) - Copyright © XCP-ng - git - https://github.com/xcp-ng/xenadmin - $([System.DateTime]::Now.ToString("yy"))$([System.DateTime]::Now.DayOfYear.ToString("D3")) - XCP-ng - XCP-ng Center - 0.0.0.$(RevisionNumber) - 0.0.0.$(RevisionNumber) - Medicine Hat - xcpngcenter_main - - - - $(RestoreSources);../Packages;https://api.nuget.org/v3/index.json - diff --git a/README.md b/README.md index b7c44d245..32c20262d 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,11 @@ Please submit any bug reports to the issue tracker, and expect for GitHub Action See here for discussion: https://xcp-ng.org/forum/topic/8202/eol-xcp-ng-center-has-come-to-an-end +## Notice on builds 25054 and up +The way settings are done has changed. If you have a previous version of XCP-ng Center installed, your configuration will not migrate over. +This is due to the new settings system that was implemented in build 25054. You will need to reconfigure your settings. This change is to +allow for a portable version of XCP-ng Center where the settings and logs will be stored in the same directory as the executable. + ## Disclaimer The official graphical client for XCP-ng is [Xen Orchestra](https://xen-orchestra.com), which gets support from a team of several developers. XCP-ng Center is maintained by community members on their free time and hosted by the XCP-ng project. diff --git a/XenAdmin/Properties/Settings.Designer.cs b/XenAdmin/Properties/Settings.Designer.cs deleted file mode 100644 index 6afe0dfcd..000000000 --- a/XenAdmin/Properties/Settings.Designer.cs +++ /dev/null @@ -1,946 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace XenAdmin.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.8.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool ToolbarsEnabled { - get { - return ((bool)(this["ToolbarsEnabled"])); - } - set { - this["ToolbarsEnabled"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public string[] ServerHistory { - get { - return ((string[])(this["ServerHistory"])); - } - set { - this["ServerHistory"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool SaveSession { - get { - return ((bool)(this["SaveSession"])); - } - set { - this["SaveSession"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool LocalSRsVisible { - get { - return ((bool)(this["LocalSRsVisible"])); - } - set { - this["LocalSRsVisible"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool DefaultTemplatesVisible { - get { - return ((bool)(this["DefaultTemplatesVisible"])); - } - set { - this["DefaultTemplatesVisible"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool UserTemplatesVisible { - get { - return ((bool)(this["UserTemplatesVisible"])); - } - set { - this["UserTemplatesVisible"] = value; - } - } - - [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 { - return ((global::System.Drawing.Size)(this["WindowSize"])); - } - set { - this["WindowSize"] = value; - } - } - - [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 { - return ((global::System.Drawing.Point)(this["WindowLocation"])); - } - set { - this["WindowLocation"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool RequirePass { - get { - return ((bool)(this["RequirePass"])); - } - set { - this["RequirePass"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool DoUpgrade { - get { - return ((bool)(this["DoUpgrade"])); - } - set { - this["DoUpgrade"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("3")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public int FullScreenShortcutKey { - get { - return ((int)(this["FullScreenShortcutKey"])); - } - set { - this["FullScreenShortcutKey"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool WindowsShortcuts { - get { - return ((bool)(this["WindowsShortcuts"])); - } - set { - this["WindowsShortcuts"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool ReceiveSoundFromRDP { - get { - return ((bool)(this["ReceiveSoundFromRDP"])); - } - set { - this["ReceiveSoundFromRDP"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool AutoSwitchToRDP { - get { - return ((bool)(this["AutoSwitchToRDP"])); - } - set { - this["AutoSwitchToRDP"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool PreserveScaleWhenUndocked { - get { - return ((bool)(this["PreserveScaleWhenUndocked"])); - } - set { - this["PreserveScaleWhenUndocked"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("0")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public int ProxySetting { - get { - return ((int)(this["ProxySetting"])); - } - set { - this["ProxySetting"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public string ProxyAddress { - get { - return ((string)(this["ProxyAddress"])); - } - set { - this["ProxyAddress"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("80")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public int ProxyPort { - get { - return ((int)(this["ProxyPort"])); - } - set { - this["ProxyPort"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool PreserveScaleWhenSwitchBackToVNC { - get { - return ((bool)(this["PreserveScaleWhenSwitchBackToVNC"])); - } - set { - this["PreserveScaleWhenSwitchBackToVNC"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("20000")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public int ConnectionTimeout { - get { - return ((int)(this["ConnectionTimeout"])); - } - set { - this["ConnectionTimeout"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("40000")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public int HttpTimeout { - get { - return ((int)(this["HttpTimeout"])); - } - set { - this["HttpTimeout"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool ShowHiddenVMs { - get { - return ((bool)(this["ShowHiddenVMs"])); - } - set { - this["ShowHiddenVMs"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool ClipboardAndPrinterRedirection { - get { - return ((bool)(this["ClipboardAndPrinterRedirection"])); - } - set { - this["ClipboardAndPrinterRedirection"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("1")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public int DockShortcutKey { - get { - return ((int)(this["DockShortcutKey"])); - } - set { - this["DockShortcutKey"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public string[] ServerAddressList { - get { - return ((string[])(this["ServerAddressList"])); - } - set { - this["ServerAddressList"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool ConnectToServerConsole { - get { - return ((bool)(this["ConnectToServerConsole"])); - } - set { - this["ConnectToServerConsole"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool WarnUnrecognizedCertificate { - get { - return ((bool)(this["WarnUnrecognizedCertificate"])); - } - set { - this["WarnUnrecognizedCertificate"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public string[] KnownServers { - get { - return ((string[])(this["KnownServers"])); - } - set { - this["KnownServers"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool WarnChangedCertificate { - get { - return ((bool)(this["WarnChangedCertificate"])); - } - set { - this["WarnChangedCertificate"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool AllowXenCenterUpdates { - get { - return ((bool)(this["AllowXenCenterUpdates"])); - } - set { - this["AllowXenCenterUpdates"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool SeenAllowUpdatesDialog { - get { - return ((bool)(this["SeenAllowUpdatesDialog"])); - } - set { - this["SeenAllowUpdatesDialog"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool FillAreaUnderGraphs { - get { - return ((bool)(this["FillAreaUnderGraphs"])); - } - set { - this["FillAreaUnderGraphs"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("null")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public string DefaultSearch { - get { - return ((string)(this["DefaultSearch"])); - } - set { - this["DefaultSearch"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool LoadPlugins { - get { - return ((bool)(this["LoadPlugins"])); - } - set { - this["LoadPlugins"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public string[] CslgCredentials { - get { - return ((string[])(this["CslgCredentials"])); - } - set { - this["CslgCredentials"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public string ServerStatusPath { - get { - return ((string)(this["ServerStatusPath"])); - } - set { - this["ServerStatusPath"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool RollingUpgradeWizardShowFirstPage { - get { - return ((bool)(this["RollingUpgradeWizardShowFirstPage"])); - } - set { - this["RollingUpgradeWizardShowFirstPage"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public string ApplicationVersion { - get { - return ((string)(this["ApplicationVersion"])); - } - set { - this["ApplicationVersion"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("0")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public int UncaptureShortcutKey { - get { - return ((int)(this["UncaptureShortcutKey"])); - } - set { - this["UncaptureShortcutKey"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool DRFailoverWizardShowFirstPage { - get { - return ((bool)(this["DRFailoverWizardShowFirstPage"])); - } - set { - this["DRFailoverWizardShowFirstPage"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool PinConnectionBar { - get { - return ((bool)(this["PinConnectionBar"])); - } - set { - this["PinConnectionBar"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool ShowAboutDialog { - get { - return ((bool)(this["ShowAboutDialog"])); - } - set { - this["ShowAboutDialog"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool ProvideProxyAuthentication { - get { - return ((bool)(this["ProvideProxyAuthentication"])); - } - set { - this["ProvideProxyAuthentication"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public string ProxyUsername { - get { - return ((string)(this["ProxyUsername"])); - } - set { - this["ProxyUsername"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public string ProxyPassword { - get { - return ((string)(this["ProxyPassword"])); - } - set { - this["ProxyPassword"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool BypassProxyForServers { - get { - return ((bool)(this["BypassProxyForServers"])); - } - set { - this["BypassProxyForServers"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("1")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public int ProxyAuthenticationMethod { - get { - return ((int)(this["ProxyAuthenticationMethod"])); - } - set { - this["ProxyAuthenticationMethod"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool DoNotConfirmDismissAlerts { - get { - return ((bool)(this["DoNotConfirmDismissAlerts"])); - } - set { - this["DoNotConfirmDismissAlerts"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool DoNotConfirmDismissEvents { - get { - return ((bool)(this["DoNotConfirmDismissEvents"])); - } - set { - this["DoNotConfirmDismissEvents"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool DoNotConfirmDismissUpdates { - get { - return ((bool)(this["DoNotConfirmDismissUpdates"])); - } - set { - this["DoNotConfirmDismissUpdates"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public string HelpLastUsed { - get { - return ((string)(this["HelpLastUsed"])); - } - set { - this["HelpLastUsed"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool EjectSharedIsoOnUpdate { - get { - return ((bool)(this["EjectSharedIsoOnUpdate"])); - } - set { - this["EjectSharedIsoOnUpdate"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool ShowUpdatesByServer { - get { - return ((bool)(this["ShowUpdatesByServer"])); - } - set { - this["ShowUpdatesByServer"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool RememberLastSelectedTab { - get { - return ((bool)(this["RememberLastSelectedTab"])); - } - set { - this["RememberLastSelectedTab"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public global::System.Windows.Forms.AutoCompleteStringCollection VMwareServerHistory { - get { - return ((global::System.Windows.Forms.AutoCompleteStringCollection)(this["VMwareServerHistory"])); - } - set { - this["VMwareServerHistory"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool ConversionClientUseSsl { - get { - return ((bool)(this["ConversionClientUseSsl"])); - } - set { - this["ConversionClientUseSsl"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool IgnoreOvfValidationWarnings { - get { - return ((bool)(this["IgnoreOvfValidationWarnings"])); - } - set { - this["IgnoreOvfValidationWarnings"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool RemindChangePassword { - get { - return ((bool)(this["RemindChangePassword"])); - } - set { - this["RemindChangePassword"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("None")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public global::XenAdmin.SshConsole CustomSshConsole { - get { - return ((global::XenAdmin.SshConsole)(this["CustomSshConsole"])); - } - set { - this["CustomSshConsole"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public string PuttyLocation { - get { - return ((string)(this["PuttyLocation"])); - } - set { - this["PuttyLocation"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public string OpenSSHLocation { - get { - return ((string)(this["OpenSSHLocation"])); - } - set { - this["OpenSSHLocation"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("\r\n")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public string[] ServerList { - get { - return ((string[])(this["ServerList"])); - } - set { - this["ServerList"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("\r\n")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public string[] DisabledPlugins { - get { - return ((string[])(this["DisabledPlugins"])); - } - set { - this["DisabledPlugins"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("\r\n")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public string[] IgnoreFirstRunWizards { - get { - return ((string[])(this["IgnoreFirstRunWizards"])); - } - set { - this["IgnoreFirstRunWizards"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("True")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool ShowTimestampsInUpdatesLog { - get { - return ((bool)(this["ShowTimestampsInUpdatesLog"])); - } - set { - this["ShowTimestampsInUpdatesLog"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public string FileServiceUsername { - get { - return ((string)(this["FileServiceUsername"])); - } - set { - this["FileServiceUsername"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public string FileServiceClientId { - get { - return ((string)(this["FileServiceClientId"])); - } - set { - this["FileServiceClientId"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool AllowXenServerUpdates { - get { - return ((bool)(this["AllowXenServerUpdates"])); - } - set { - this["AllowXenServerUpdates"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool AllowPatchesUpdates { - get { - return ((bool)(this["AllowPatchesUpdates"])); - } - set { - this["AllowPatchesUpdates"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("False")] - [global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)] - public bool SeenAllowCfuUpdatesDialog { - get { - return ((bool)(this["SeenAllowCfuUpdatesDialog"])); - } - set { - this["SeenAllowCfuUpdatesDialog"] = value; - } - } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("Normal")] - public string WindowState { - get { - return ((string)(this["WindowState"])); - } - set { - this["WindowState"] = value; - } - } - } -} diff --git a/XenAdmin/Properties/Settings.cs b/XenAdmin/Properties/Settings.cs new file mode 100644 index 000000000..120bdbfb6 --- /dev/null +++ b/XenAdmin/Properties/Settings.cs @@ -0,0 +1,920 @@ + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Configuration; +using System.Drawing; +using System.IO; +using System.Runtime.CompilerServices; +using System.Windows.Forms; +using System.Xml.Serialization; +using XenAdmin.Core; + +namespace XenAdmin.Properties +{ + + + public class Settings : INotifyPropertyChanged + { + private static readonly string _settingsPath = + Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), + BrandManager.ProductBrand, BrandManager.BrandConsole, "Settings.xml"); + + private static Settings _default; + private bool _toolbarsEnabled = true; + private string[] _serverHistory = Array.Empty(); + private bool _saveSession = true; + private bool _localSRsVisible = true; + private bool _defaultTemplatesVisible = false; + private bool _userTemplatesVisible = true; + private Size _windowSize = new System.Drawing.Size(1024, 769); + private Point _windowLocation = new System.Drawing.Point(150, 20); + private bool _requirePass = false; + private bool _doUpgrade = true; + private int _fullScreenShortcutKey = 3; + private bool _windowsShortcuts = true; + private bool _receiveSoundFromRdp = true; + private bool _autoSwitchToRdp = true; + private bool _preserveScaleWhenUndocked = true; + private int _proxySetting = 0; + private string _proxyAddress = string.Empty; + private int _proxyPort = 80; + private bool _preserveScaleWhenSwitchBackToVnc = true; + private int _connectionTimeout = 20000; + private int _httpTimeout = 40000; + private bool _showHiddenVMs = false; + private bool _clipboardAndPrinterRedirection = true; + private int _dockShortcutKey = 1; + private string[] _serverAddressList = Array.Empty(); + private bool _connectToServerConsole = true; + private bool _warnUnrecognizedCertificate = false; + private string[] _knownServers = Array.Empty(); + private bool _warnChangedCertificate = true; + private bool _allowXenCenterUpdates = true; + private bool _seenAllowUpdatesDialog = false; + private bool _fillAreaUnderGraphs = false; + private string _defaultSearch = null; + private bool _loadPlugins = true; + private string[] _cslgCredentials = Array.Empty(); + private string _serverStatusPath; + private bool _rollingUpgradeWizardShowFirstPage = false; + private string _applicationVersion = string.Empty; + private int _uncaptureShortcutKey = 0; + private bool _drFailoverWizardShowFirstPage = true; + private bool _pinConnectionBar = true; + private bool _showAboutDialog = true; + private bool _provideProxyAuthentication = false; + private string _proxyUsername = string.Empty; + private string _proxyPassword = string.Empty; + private bool _bypassProxyForServers = false; + private int _proxyAuthenticationMethod = 1; + private bool _doNotConfirmDismissAlerts = false; + private bool _doNotConfirmDismissEvents = false; + private bool _doNotConfirmDismissUpdates = false; + private string _helpLastUsed = string.Empty; + private bool _ejectSharedIsoOnUpdate = false; + private bool _showUpdatesByServer = false; + private bool _rememberLastSelectedTab = true; + private AutoCompleteStringCollection _vMwareServerHistory = new System.Windows.Forms.AutoCompleteStringCollection(); + private bool _conversionClientUseSsl = true; + private bool _ignoreOvfValidationWarnings = false; + private bool _remindChangePassword = true; + private SshConsole _customSshConsole = SshConsole.None; + private string _puttyLocation = string.Empty; + private string _openSshLocation = string.Empty; + private string[] _serverList = Array.Empty(); + private string[] _disabledPlugins = Array.Empty(); + private string[] _ignoreFirstRunWizards = Array.Empty(); + private bool _showTimestampsInUpdatesLog = true; + private string _fileServiceUsername = string.Empty; + private string _fileServiceClientId = string.Empty; + private bool _allowXenServerUpdates = false; + private bool _allowPatchesUpdates = false; + private bool _seenAllowCfuUpdatesDialog = false; + private string _windowState = "Normal"; + + public static Settings Default + { + get => _default; + internal set => _default = value; + } + + public bool ToolbarsEnabled + { + get => _toolbarsEnabled; + set + { + if (value == _toolbarsEnabled) return; + _toolbarsEnabled = value; + OnPropertyChanged(); + } + } + + public string[] ServerHistory + { + get => _serverHistory; + set + { + if (Equals(value, _serverHistory)) return; + _serverHistory = value; + OnPropertyChanged(); + } + } + + public bool SaveSession + { + get => _saveSession; + set + { + if (value == _saveSession) return; + _saveSession = value; + OnPropertyChanged(); + } + } + + public bool LocalSRsVisible + { + get => _localSRsVisible; + set + { + if (value == _localSRsVisible) return; + _localSRsVisible = value; + OnPropertyChanged(); + } + } + + public bool DefaultTemplatesVisible + { + get => _defaultTemplatesVisible; + set + { + if (value == _defaultTemplatesVisible) return; + _defaultTemplatesVisible = value; + OnPropertyChanged(); + } + } + + public bool UserTemplatesVisible + { + get => _userTemplatesVisible; + set + { + if (value == _userTemplatesVisible) return; + _userTemplatesVisible = value; + OnPropertyChanged(); + } + } + + public global::System.Drawing.Size WindowSize + { + get => _windowSize; + set + { + if (value.Equals(_windowSize)) return; + _windowSize = value; + OnPropertyChanged(); + } + } + + public global::System.Drawing.Point WindowLocation + { + get => _windowLocation; + set + { + if (value.Equals(_windowLocation)) return; + _windowLocation = value; + OnPropertyChanged(); + } + } + + public bool RequirePass + { + get => _requirePass; + set + { + if (value == _requirePass) return; + _requirePass = value; + OnPropertyChanged(); + } + } + + public bool DoUpgrade + { + get => _doUpgrade; + set + { + if (value == _doUpgrade) return; + _doUpgrade = value; + OnPropertyChanged(); + } + } + + public int FullScreenShortcutKey + { + get => _fullScreenShortcutKey; + set + { + if (value == _fullScreenShortcutKey) return; + _fullScreenShortcutKey = value; + OnPropertyChanged(); + } + } + + public bool WindowsShortcuts + { + get => _windowsShortcuts; + set + { + if (value == _windowsShortcuts) return; + _windowsShortcuts = value; + OnPropertyChanged(); + } + } + + public bool ReceiveSoundFromRDP + { + get => _receiveSoundFromRdp; + set + { + if (value == _receiveSoundFromRdp) return; + _receiveSoundFromRdp = value; + OnPropertyChanged(); + } + } + + public bool AutoSwitchToRDP + { + get => _autoSwitchToRdp; + set + { + if (value == _autoSwitchToRdp) return; + _autoSwitchToRdp = value; + OnPropertyChanged(); + } + } + + public bool PreserveScaleWhenUndocked + { + get => _preserveScaleWhenUndocked; + set + { + if (value == _preserveScaleWhenUndocked) return; + _preserveScaleWhenUndocked = value; + OnPropertyChanged(); + } + } + + public int ProxySetting + { + get => _proxySetting; + set + { + if (value == _proxySetting) return; + _proxySetting = value; + OnPropertyChanged(); + } + } + + public string ProxyAddress + { + get => _proxyAddress; + set + { + if (value == _proxyAddress) return; + _proxyAddress = value; + OnPropertyChanged(); + } + } + + public int ProxyPort + { + get => _proxyPort; + set + { + if (value == _proxyPort) return; + _proxyPort = value; + OnPropertyChanged(); + } + } + + public bool PreserveScaleWhenSwitchBackToVNC + { + get => _preserveScaleWhenSwitchBackToVnc; + set + { + if (value == _preserveScaleWhenSwitchBackToVnc) return; + _preserveScaleWhenSwitchBackToVnc = value; + OnPropertyChanged(); + } + } + + public int ConnectionTimeout + { + get => _connectionTimeout; + set + { + if (value == _connectionTimeout) return; + _connectionTimeout = value; + OnPropertyChanged(); + } + } + + public int HttpTimeout + { + get => _httpTimeout; + set + { + if (value == _httpTimeout) return; + _httpTimeout = value; + OnPropertyChanged(); + } + } + + public bool ShowHiddenVMs + { + get => _showHiddenVMs; + set + { + if (value == _showHiddenVMs) return; + _showHiddenVMs = value; + OnPropertyChanged(); + } + } + + public bool ClipboardAndPrinterRedirection + { + get => _clipboardAndPrinterRedirection; + set + { + if (value == _clipboardAndPrinterRedirection) return; + _clipboardAndPrinterRedirection = value; + OnPropertyChanged(); + } + } + + public int DockShortcutKey + { + get => _dockShortcutKey; + set + { + if (value == _dockShortcutKey) return; + _dockShortcutKey = value; + OnPropertyChanged(); + } + } + + public string[] ServerAddressList + { + get => _serverAddressList; + set + { + if (Equals(value, _serverAddressList)) return; + _serverAddressList = value; + OnPropertyChanged(); + } + } + + public bool ConnectToServerConsole + { + get => _connectToServerConsole; + set + { + if (value == _connectToServerConsole) return; + _connectToServerConsole = value; + OnPropertyChanged(); + } + } + + public bool WarnUnrecognizedCertificate + { + get => _warnUnrecognizedCertificate; + set + { + if (value == _warnUnrecognizedCertificate) return; + _warnUnrecognizedCertificate = value; + OnPropertyChanged(); + } + } + + public string[] KnownServers + { + get => _knownServers; + set + { + if (Equals(value, _knownServers)) return; + _knownServers = value; + OnPropertyChanged(); + } + } + + public bool WarnChangedCertificate + { + get => _warnChangedCertificate; + set + { + if (value == _warnChangedCertificate) return; + _warnChangedCertificate = value; + OnPropertyChanged(); + } + } + + public bool AllowXenCenterUpdates + { + get => _allowXenCenterUpdates; + set + { + if (value == _allowXenCenterUpdates) return; + _allowXenCenterUpdates = value; + OnPropertyChanged(); + } + } + + public bool SeenAllowUpdatesDialog + { + get => _seenAllowUpdatesDialog; + set + { + if (value == _seenAllowUpdatesDialog) return; + _seenAllowUpdatesDialog = value; + OnPropertyChanged(); + } + } + + public bool FillAreaUnderGraphs + { + get => _fillAreaUnderGraphs; + set + { + if (value == _fillAreaUnderGraphs) return; + _fillAreaUnderGraphs = value; + OnPropertyChanged(); + } + } + + public string DefaultSearch + { + get => _defaultSearch; + set + { + if (value == _defaultSearch) return; + _defaultSearch = value; + OnPropertyChanged(); + } + } + + public bool LoadPlugins + { + get => _loadPlugins; + set + { + if (value == _loadPlugins) return; + _loadPlugins = value; + OnPropertyChanged(); + } + } + + public string[] CslgCredentials + { + get => _cslgCredentials; + set + { + if (Equals(value, _cslgCredentials)) return; + _cslgCredentials = value; + OnPropertyChanged(); + } + } + + public string ServerStatusPath + { + get => _serverStatusPath; + set + { + if (value == _serverStatusPath) return; + _serverStatusPath = value; + OnPropertyChanged(); + } + } + + public bool RollingUpgradeWizardShowFirstPage + { + get => _rollingUpgradeWizardShowFirstPage; + set + { + if (value == _rollingUpgradeWizardShowFirstPage) return; + _rollingUpgradeWizardShowFirstPage = value; + OnPropertyChanged(); + } + } + + public string ApplicationVersion + { + get => _applicationVersion; + set + { + if (value == _applicationVersion) return; + _applicationVersion = value; + OnPropertyChanged(); + } + } + + public int UncaptureShortcutKey + { + get => _uncaptureShortcutKey; + set + { + if (value == _uncaptureShortcutKey) return; + _uncaptureShortcutKey = value; + OnPropertyChanged(); + } + } + + public bool DRFailoverWizardShowFirstPage + { + get => _drFailoverWizardShowFirstPage; + set + { + if (value == _drFailoverWizardShowFirstPage) return; + _drFailoverWizardShowFirstPage = value; + OnPropertyChanged(); + } + } + + public bool PinConnectionBar + { + get => _pinConnectionBar; + set + { + if (value == _pinConnectionBar) return; + _pinConnectionBar = value; + OnPropertyChanged(); + } + } + + public bool ShowAboutDialog + { + get => _showAboutDialog; + set + { + if (value == _showAboutDialog) return; + _showAboutDialog = value; + OnPropertyChanged(); + } + } + + public bool ProvideProxyAuthentication + { + get => _provideProxyAuthentication; + set + { + if (value == _provideProxyAuthentication) return; + _provideProxyAuthentication = value; + OnPropertyChanged(); + } + } + + public string ProxyUsername + { + get => _proxyUsername; + set + { + if (value == _proxyUsername) return; + _proxyUsername = value; + OnPropertyChanged(); + } + } + + public string ProxyPassword + { + get => _proxyPassword; + set + { + if (value == _proxyPassword) return; + _proxyPassword = value; + OnPropertyChanged(); + } + } + + public bool BypassProxyForServers + { + get => _bypassProxyForServers; + set + { + if (value == _bypassProxyForServers) return; + _bypassProxyForServers = value; + OnPropertyChanged(); + } + } + + public int ProxyAuthenticationMethod + { + get => _proxyAuthenticationMethod; + set + { + if (value == _proxyAuthenticationMethod) return; + _proxyAuthenticationMethod = value; + OnPropertyChanged(); + } + } + + public bool DoNotConfirmDismissAlerts + { + get => _doNotConfirmDismissAlerts; + set + { + if (value == _doNotConfirmDismissAlerts) return; + _doNotConfirmDismissAlerts = value; + OnPropertyChanged(); + } + } + + public bool DoNotConfirmDismissEvents + { + get => _doNotConfirmDismissEvents; + set + { + if (value == _doNotConfirmDismissEvents) return; + _doNotConfirmDismissEvents = value; + OnPropertyChanged(); + } + } + + public bool DoNotConfirmDismissUpdates + { + get => _doNotConfirmDismissUpdates; + set + { + if (value == _doNotConfirmDismissUpdates) return; + _doNotConfirmDismissUpdates = value; + OnPropertyChanged(); + } + } + + public string HelpLastUsed + { + get => _helpLastUsed; + set + { + if (value == _helpLastUsed) return; + _helpLastUsed = value; + OnPropertyChanged(); + } + } + + public bool EjectSharedIsoOnUpdate + { + get => _ejectSharedIsoOnUpdate; + set + { + if (value == _ejectSharedIsoOnUpdate) return; + _ejectSharedIsoOnUpdate = value; + OnPropertyChanged(); + } + } + + public bool ShowUpdatesByServer + { + get => _showUpdatesByServer; + set + { + if (value == _showUpdatesByServer) return; + _showUpdatesByServer = value; + OnPropertyChanged(); + } + } + + public bool RememberLastSelectedTab + { + get => _rememberLastSelectedTab; + set + { + if (value == _rememberLastSelectedTab) return; + _rememberLastSelectedTab = value; + OnPropertyChanged(); + } + } + + public global::System.Windows.Forms.AutoCompleteStringCollection VMwareServerHistory + { + get => _vMwareServerHistory; + set + { + if (Equals(value, _vMwareServerHistory)) return; + _vMwareServerHistory = value; + OnPropertyChanged(); + } + } + + public bool ConversionClientUseSsl + { + get => _conversionClientUseSsl; + set + { + if (value == _conversionClientUseSsl) return; + _conversionClientUseSsl = value; + OnPropertyChanged(); + } + } + + public bool IgnoreOvfValidationWarnings + { + get => _ignoreOvfValidationWarnings; + set + { + if (value == _ignoreOvfValidationWarnings) return; + _ignoreOvfValidationWarnings = value; + OnPropertyChanged(); + } + } + + public bool RemindChangePassword + { + get => _remindChangePassword; + set + { + if (value == _remindChangePassword) return; + _remindChangePassword = value; + OnPropertyChanged(); + } + } + + public global::XenAdmin.SshConsole CustomSshConsole + { + get => _customSshConsole; + set + { + if (value == _customSshConsole) return; + _customSshConsole = value; + OnPropertyChanged(); + } + } + + public string PuttyLocation + { + get => _puttyLocation; + set + { + if (value == _puttyLocation) return; + _puttyLocation = value; + OnPropertyChanged(); + } + } + + public string OpenSSHLocation + { + get => _openSshLocation; + set + { + if (value == _openSshLocation) return; + _openSshLocation = value; + OnPropertyChanged(); + } + } + + public string[] ServerList + { + get => _serverList; + set + { + if (Equals(value, _serverList)) return; + _serverList = value; + OnPropertyChanged(); + } + } + + public string[] DisabledPlugins + { + get => _disabledPlugins; + set + { + if (Equals(value, _disabledPlugins)) return; + _disabledPlugins = value; + OnPropertyChanged(); + } + } + + public string[] IgnoreFirstRunWizards + { + get => _ignoreFirstRunWizards; + set + { + if (Equals(value, _ignoreFirstRunWizards)) return; + _ignoreFirstRunWizards = value; + OnPropertyChanged(); + } + } + + public bool ShowTimestampsInUpdatesLog + { + get => _showTimestampsInUpdatesLog; + set + { + if (value == _showTimestampsInUpdatesLog) return; + _showTimestampsInUpdatesLog = value; + OnPropertyChanged(); + } + } + + public string FileServiceUsername + { + get => _fileServiceUsername; + set + { + if (value == _fileServiceUsername) return; + _fileServiceUsername = value; + OnPropertyChanged(); + } + } + + public string FileServiceClientId + { + get => _fileServiceClientId; + set + { + if (value == _fileServiceClientId) return; + _fileServiceClientId = value; + OnPropertyChanged(); + } + } + + public bool AllowXenServerUpdates + { + get => _allowXenServerUpdates; + set + { + if (value == _allowXenServerUpdates) return; + _allowXenServerUpdates = value; + OnPropertyChanged(); + } + } + + public bool AllowPatchesUpdates + { + get => _allowPatchesUpdates; + set + { + if (value == _allowPatchesUpdates) return; + _allowPatchesUpdates = value; + OnPropertyChanged(); + } + } + + public bool SeenAllowCfuUpdatesDialog + { + get => _seenAllowCfuUpdatesDialog; + set + { + if (value == _seenAllowCfuUpdatesDialog) return; + _seenAllowCfuUpdatesDialog = value; + OnPropertyChanged(); + } + } + + public string WindowState + { + get => _windowState; + set + { + if (value == _windowState) return; + _windowState = value; + OnPropertyChanged(); + } + } + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); + } + + public event SettingChangingEventHandler SettingChanging; + + internal static void Load() + { + if (!File.Exists(_settingsPath)) + { + Default = new Settings(); + return; + } + + using (var fs = new FileStream(_settingsPath, FileMode.Open)) + { + XmlSerializer x = new XmlSerializer(typeof(Settings)); + Default = (Settings)x.Deserialize(fs); + } + } + + internal void Save() + { + using (var fs = new FileStream(_settingsPath, FileMode.Create)) + { + XmlSerializer x = new XmlSerializer(typeof(Settings)); + x.Serialize(fs, Default); + } + } + + internal void Upgrade() + { + } + } +} diff --git a/XenAdmin/Properties/Settings.settings b/XenAdmin/Properties/Settings.settings deleted file mode 100644 index 565141289..000000000 --- a/XenAdmin/Properties/Settings.settings +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - True - - - - - - True - - - True - - - False - - - True - - - 1024, 769 - - - 150, 20 - - - False - - - True - - - 3 - - - True - - - True - - - True - - - True - - - 0 - - - - - - 80 - - - True - - - 20000 - - - 40000 - - - False - - - True - - - 1 - - - - - - True - - - False - - - - - - True - - - True - - - False - - - False - - - null - - - True - - - - - - - - - False - - - - - - 0 - - - True - - - True - - - True - - - False - - - - - - - - - False - - - 1 - - - False - - - False - - - False - - - - - - False - - - False - - - True - - - - - - True - - - False - - - True - - - None - - - - - - - - - <?xml version="1.0" encoding="utf-16"?> -<ArrayOfString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" /> - - - <?xml version="1.0" encoding="utf-16"?> -<ArrayOfString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" /> - - - <?xml version="1.0" encoding="utf-16"?> -<ArrayOfString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" /> - - - True - - - - - - - - - False - - - False - - - False - - - Normal - - - \ No newline at end of file diff --git a/XenAdmin/Settings.cs b/XenAdmin/Settings.cs index a7c0f764f..c26940b97 100644 --- a/XenAdmin/Settings.cs +++ b/XenAdmin/Settings.cs @@ -736,6 +736,8 @@ public static void Log() public static void Load() { + Properties.Settings.Load(); + string appVersionString = Program.Version.ToString(); log.InfoFormat("Application version of current settings {0}", appVersionString); diff --git a/XenAdmin/XenAdmin.csproj b/XenAdmin/XenAdmin.csproj index b30eb87ce..18d028ea9 100755 --- a/XenAdmin/XenAdmin.csproj +++ b/XenAdmin/XenAdmin.csproj @@ -48,22 +48,10 @@ True Resources.resx - - True - True - Settings.settings - True True ChooseSrProvisioningPage.resx - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - \ No newline at end of file diff --git a/XenAdmin/app.config b/XenAdmin/app.config index e4ad4a6bc..783d1371a 100644 --- a/XenAdmin/app.config +++ b/XenAdmin/app.config @@ -1,314 +1,106 @@ - - -
- -
- - - - - - True - - - True - - - True - - - False - - - True - - - 1024, 769 - - - 150, 20 - - - False - - - True - - - 3 - - - True - - - True - - - True - - - True - - - 0 - - - - - - 80 - - - True - - - 20000 - - - 40000 - - - False - - - True - - - 1 - - - True - - - False - - - True - - - True - - - False - - - False - - - null - - - True - - - - - - False - - - - - - 0 - - - True - - - True - - - True - - - False - - - - - - - - - False - - - 1 - - - False - - - False - - - False - - - - - - False - - - False - - - True - - - True - - - False - - - True - - - None - - - - - - - - - - - - - - - - - - - - - - - - True - - - - - - - - - False - - - False - - - False - - - Normal - - - + +
+ + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + +