diff --git a/mRemoteV1/Config/Settings/Providers/AppSettingsProvider.cs b/mRemoteV1/Config/Settings/Providers/AppSettingsProvider.cs
deleted file mode 100644
index d066d0edb..000000000
--- a/mRemoteV1/Config/Settings/Providers/AppSettingsProvider.cs
+++ /dev/null
@@ -1,241 +0,0 @@
-#if false
-using System;
-using System.Collections.Specialized;
-using System.Configuration;
-using System.IO;
-using System.Windows.Forms;
-using System.Xml;
-
-
-namespace mRemoteNG.Config.Settings.Providers
-{
- public class AppSettingsProvider : SettingsProvider
- {
- const string SETTINGSROOT = "Settings"; //XML Root Node
-
- public override void Initialize(string name, NameValueCollection col)
- {
- if (Application.ProductName.Trim().Length > 0)
- {
- _applicationName = Application.ProductName;
- }
- else
- {
- _applicationName = Path.GetFileNameWithoutExtension(Application.ExecutablePath);
- }
-
- base.Initialize(ApplicationName, col);
-
- /*
- if (!File.Exists(GetDotSettingsFile()))
- {
- // do something smart.
- }
- */
- }
-
- private string _applicationName;
- public override string ApplicationName
- {
- get { return _applicationName; }
- set { }
- }
-
- public virtual string GetDotSettingsFile()
- {
- return Path.Combine(GetAppSettingsPath(), GetAppSettingsFilename());
- }
-
-
- public virtual string GetAppSettingsPath()
- {
- //Used to determine where to store the settings
- return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), Application.ProductName);
- }
-
- public virtual string GetAppSettingsFilename()
- {
- //Used to determine the filename to store the settings
- return Application.ProductName + ".settings";
- }
-
- public override void SetPropertyValues(SettingsContext context, SettingsPropertyValueCollection propvals)
- {
- //Iterate through the settings to be stored
- //Only dirty settings are included in propvals, and only ones relevant to this provider
- foreach (SettingsPropertyValue propval in propvals)
- {
- SetValue(propval);
- }
-
- try
- {
- SettingsXml.Save(GetDotSettingsFile());
- }
- catch (Exception)
- {
- //Ignore if cant save, device been ejected
- }
- }
-
- public override SettingsPropertyValueCollection GetPropertyValues(SettingsContext context, SettingsPropertyCollection props)
- {
- //Create new collection of values
- var values = new SettingsPropertyValueCollection();
-
- //Iterate through the settings to be retrieved
- foreach (SettingsProperty setting in props)
- {
-
- var value = new SettingsPropertyValue(setting)
- {
- IsDirty = false,
- SerializedValue = GetValue(setting)
- };
- values.Add(value);
- }
- return values;
- }
-
- private XmlDocument _SettingsXml;
-
- private XmlDocument SettingsXml
- {
- get
- {
- //If we dont hold an xml document, try opening one.
- //If it doesnt exist then create a new one ready.
- if (_SettingsXml == null)
- {
- _SettingsXml = new XmlDocument();
-
- try
- {
- _SettingsXml.Load(GetDotSettingsFile());
- }
- catch (Exception)
- {
- //Create new document
- var dec = _SettingsXml.CreateXmlDeclaration("1.0", "utf-8", string.Empty);
- _SettingsXml.AppendChild(dec);
-
- var nodeRoot = _SettingsXml.CreateNode(XmlNodeType.Element, SETTINGSROOT, "");
- _SettingsXml.AppendChild(nodeRoot);
- }
- }
- return _SettingsXml;
- }
- }
-
- private string GetValue(SettingsProperty setting)
- {
- var ret = string.Empty;
-
- try
- {
- if (IsRoaming(setting))
- {
- ret = SettingsXml.SelectSingleNode(SETTINGSROOT + "/" + setting.Name).InnerText;
- }
- else
- {
- ret = SettingsXml.SelectSingleNode(SETTINGSROOT + "/" + Environment.MachineName + "/" + setting.Name).InnerText;
- }
- }
- catch (Exception)
- {
- ret = setting.DefaultValue?.ToString() ?? "";
- }
- return ret;
- }
-
- private void SetValue(SettingsPropertyValue propVal)
- {
- System.Xml.XmlElement MachineNode = default(System.Xml.XmlElement);
- System.Xml.XmlElement SettingNode = default(System.Xml.XmlElement);
-
- //Determine if the setting is roaming.
- //If roaming then the value is stored as an element under the root
- //Otherwise it is stored under a machine name node
- try
- {
- if (IsRoaming(propVal.Property))
- {
- SettingNode = (XmlElement) (SettingsXml.SelectSingleNode(SETTINGSROOT + "/" + propVal.Name));
- }
- else
- {
- SettingNode = (XmlElement) (SettingsXml.SelectSingleNode(SETTINGSROOT + "/" + (new Microsoft.VisualBasic.Devices.Computer()).Name + "/" + propVal.Name));
- }
- }
- catch (Exception)
- {
- SettingNode = null;
- }
-
- //Check to see if the node exists, if so then set its new value
- if (SettingNode != null)
- {
- if (propVal.SerializedValue != null)
- {
- SettingNode.InnerText = propVal.SerializedValue.ToString();
- }
- }
- else
- {
- if (IsRoaming(propVal.Property))
- {
- //Store the value as an element of the Settings Root Node
- SettingNode = SettingsXml.CreateElement(propVal.Name);
- if (propVal.SerializedValue != null)
- {
- SettingNode.InnerText = propVal.SerializedValue.ToString();
- }
- SettingsXml.SelectSingleNode(SETTINGSROOT).AppendChild(SettingNode);
- }
- else
- {
- //Its machine specific, store as an element of the machine name node,
- //creating a new machine name node if one doesnt exist.
- try
- {
- MachineNode = (XmlElement) (SettingsXml.SelectSingleNode(SETTINGSROOT + "/" + (new Microsoft.VisualBasic.Devices.Computer()).Name));
- }
- catch (Exception)
- {
- MachineNode = SettingsXml.CreateElement((new Microsoft.VisualBasic.Devices.Computer()).Name);
- SettingsXml.SelectSingleNode(SETTINGSROOT).AppendChild(MachineNode);
- }
-
- if (MachineNode == null)
- {
- MachineNode = SettingsXml.CreateElement((new Microsoft.VisualBasic.Devices.Computer()).Name);
- SettingsXml.SelectSingleNode(SETTINGSROOT).AppendChild(MachineNode);
- }
-
- SettingNode = SettingsXml.CreateElement(propVal.Name);
- if (propVal.SerializedValue != null)
- {
- SettingNode.InnerText = propVal.SerializedValue.ToString();
- }
- MachineNode.AppendChild(SettingNode);
- }
- }
- }
-
- private bool IsRoaming(SettingsProperty prop)
- {
- //Determine if the setting is marked as Roaming
- //For Each d As DictionaryEntry In prop.Attributes
- // Dim a As Attribute = DirectCast(d.Value, Attribute)
- // If TypeOf a Is System.Configuration.SettingsManageabilityAttribute Then
- // Return True
- // End If
- //Next
- //Return False
-
- return true;
- }
- }
-}
-#endif
\ No newline at end of file
diff --git a/mRemoteV1/Config/Settings/Providers/ChooseProvider.cs b/mRemoteV1/Config/Settings/Providers/ChooseProvider.cs
index 0530f5b9d..5edbde037 100644
--- a/mRemoteV1/Config/Settings/Providers/ChooseProvider.cs
+++ b/mRemoteV1/Config/Settings/Providers/ChooseProvider.cs
@@ -1,12 +1,11 @@
-namespace mRemoteNG.Config.Settings.Providers
+using System.Configuration;
+
+namespace mRemoteNG.Config.Settings.Providers
{
-#if false
#if PORTABLE
public class ChooseProvider : PortableSettingsProvider
#else
- public class ChooseProvider : AppSettingsProvider
-#endif
- {
- }
+ public class ChooseProvider : LocalFileSettingsProvider
#endif
+ { }
}
\ No newline at end of file
diff --git a/mRemoteV1/Config/Settings/Providers/PortableSettingsProvider.cs b/mRemoteV1/Config/Settings/Providers/PortableSettingsProvider.cs
index 9221bda65..3e42acfe7 100644
--- a/mRemoteV1/Config/Settings/Providers/PortableSettingsProvider.cs
+++ b/mRemoteV1/Config/Settings/Providers/PortableSettingsProvider.cs
@@ -1,234 +1,245 @@
-#if false
+/// The MIT License (MIT)
+///
+/// Copyright(c) crdx
+///
+/// Permission is hereby granted, free of charge, to any person obtaining
+/// a copy of this software and associated documentation files (the
+/// "Software"), to deal in the Software without restriction, including
+/// without limitation the rights to use, copy, modify, merge, publish,
+/// distribute, sublicense, and/or sell copies of the Software, and to
+/// permit persons to whom the Software is furnished to do so, subject to
+/// the following conditions:
+///
+/// The above copyright notice and this permission notice shall be
+/// included in all copies or substantial portions of the Software.
+///
+/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+/// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+/// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+/// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+/// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+/// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+/// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+///
+/// https://raw.githubusercontent.com/crdx/PortableSettingsProvider
+///
+using System.Linq;
using System;
-using System.Collections.Specialized;
+using System.Collections;
+using System.Collections.Generic;
using System.Configuration;
-using System.IO;
using System.Windows.Forms;
+using System.Collections.Specialized;
using System.Xml;
-
+using System.IO;
namespace mRemoteNG.Config.Settings.Providers
{
- public class PortableSettingsProvider : SettingsProvider
- {
- const string SETTINGSROOT = "Settings"; //XML Root Node
+ public class PortableSettingsProvider : SettingsProvider, IApplicationSettingsProvider
+ {
+ private const string _rootNodeName = "settings";
+ private const string _localSettingsNodeName = "localSettings";
+ private const string _globalSettingsNodeName = "globalSettings";
+ private const string _className = "PortableSettingsProvider";
+ private XmlDocument _xmlDocument;
- public override void Initialize(string name, NameValueCollection col)
- {
- if (Application.ProductName.Trim().Length > 0)
+ private string _filePath
+ {
+ get
{
- _applicationName = Application.ProductName;
+ return Path.Combine(Path.GetDirectoryName(Application.ExecutablePath),
+ string.Format("{0}.settings", ApplicationName));
+ }
+ }
+
+ private XmlNode _localSettingsNode
+ {
+ get
+ {
+ XmlNode settingsNode = GetSettingsNode(_localSettingsNodeName);
+ XmlNode machineNode = settingsNode.SelectSingleNode(Environment.MachineName.ToLowerInvariant());
+
+ if (machineNode == null)
+ {
+ machineNode = _rootDocument.CreateElement(Environment.MachineName.ToLowerInvariant());
+ settingsNode.AppendChild(machineNode);
+ }
+
+ return machineNode;
+ }
+ }
+
+ private XmlNode _globalSettingsNode
+ {
+ get { return GetSettingsNode(_globalSettingsNodeName); }
+ }
+
+ private XmlNode _rootNode
+ {
+ get { return _rootDocument.SelectSingleNode(_rootNodeName); }
+ }
+
+ private XmlDocument _rootDocument
+ {
+ get
+ {
+ if (_xmlDocument == null)
+ {
+ try
+ {
+ _xmlDocument = new XmlDocument();
+ _xmlDocument.Load(_filePath);
+ }
+ catch (Exception)
+ {
+
+ }
+
+ if (_xmlDocument.SelectSingleNode(_rootNodeName) != null)
+ return _xmlDocument;
+
+ _xmlDocument = GetBlankXmlDocument();
+ }
+
+ return _xmlDocument;
}
- else
- {
- _applicationName = Path.GetFileNameWithoutExtension(Application.ExecutablePath);
- }
-
- base.Initialize(ApplicationName, col);
}
- private string _applicationName;
public override string ApplicationName
{
- get { return _applicationName; }
+ get { return Path.GetFileNameWithoutExtension(Application.ExecutablePath); }
set { }
}
- public virtual string GetDotSettingsFile()
+ public override string Name
{
- return Path.Combine(GetAppSettingsPath(), GetAppSettingsFilename());
+ get { return _className; }
}
- public virtual string GetAppSettingsPath()
- {
- //Used to determine where to store the settings
- System.IO.FileInfo fi = new System.IO.FileInfo(Application.ExecutablePath);
- return fi.DirectoryName;
- }
-
- public virtual string GetAppSettingsFilename()
- {
- //Used to determine the filename to store the settings
- return "portable.settings.";
- }
-
- public override void SetPropertyValues(SettingsContext context, SettingsPropertyValueCollection propvals)
- {
- //Iterate through the settings to be stored
- //Only dirty settings are included in propvals, and only ones relevant to this provider
- foreach (SettingsPropertyValue propval in propvals)
- {
- SetValue(propval);
- }
-
- try
- {
- SettingsXml.Save(GetDotSettingsFile());
- }
- catch (Exception)
- {
- //Ignore if cant save, device been ejected
- }
- }
-
- public override SettingsPropertyValueCollection GetPropertyValues(SettingsContext context, SettingsPropertyCollection props)
- {
- //Create new collection of values
- var values = new SettingsPropertyValueCollection();
-
- //Iterate through the settings to be retrieved
- foreach (SettingsProperty setting in props)
- {
+ public override void Initialize(string name, NameValueCollection config)
+ {
+ base.Initialize(Name, config);
+ }
- var value = new SettingsPropertyValue(setting)
- {
- IsDirty = false,
- SerializedValue = GetValue(setting)
- };
- values.Add(value);
- }
- return values;
- }
-
- private XmlDocument _SettingsXml;
-
- private XmlDocument SettingsXml
- {
- get
- {
- //If we dont hold an xml document, try opening one.
- //If it doesnt exist then create a new one ready.
- if (_SettingsXml == null)
- {
- _SettingsXml = new XmlDocument();
-
- try
- {
- _SettingsXml.Load(GetDotSettingsFile());
- }
- catch (Exception)
- {
- //Create new document
- var dec = _SettingsXml.CreateXmlDeclaration("1.0", "utf-8", string.Empty);
- _SettingsXml.AppendChild(dec);
+ public override void SetPropertyValues(SettingsContext context, SettingsPropertyValueCollection collection)
+ {
+ foreach (SettingsPropertyValue propertyValue in collection)
+ SetValue(propertyValue);
- var nodeRoot = _SettingsXml.CreateNode(XmlNodeType.Element, SETTINGSROOT, "");
- _SettingsXml.AppendChild(nodeRoot);
- }
- }
- return _SettingsXml;
- }
- }
-
- private string GetValue(SettingsProperty setting)
- {
- var ret = string.Empty;
-
- try
- {
- if (IsRoaming(setting))
- {
- ret = SettingsXml.SelectSingleNode(SETTINGSROOT + "/" + setting.Name).InnerText;
- }
- else
- {
- ret = SettingsXml.SelectSingleNode(SETTINGSROOT + "/" + Environment.MachineName + "/" + setting.Name).InnerText;
- }
- }
- catch (Exception)
- {
- ret = setting.DefaultValue?.ToString() ?? "";
- }
- return ret;
- }
-
- private void SetValue(SettingsPropertyValue propVal)
- {
- System.Xml.XmlElement MachineNode = default(System.Xml.XmlElement);
- System.Xml.XmlElement SettingNode = default(System.Xml.XmlElement);
-
- //Determine if the setting is roaming.
- //If roaming then the value is stored as an element under the root
- //Otherwise it is stored under a machine name node
- try
- {
- if (IsRoaming(propVal.Property))
- {
- SettingNode = (XmlElement) (SettingsXml.SelectSingleNode(SETTINGSROOT + "/" + propVal.Name));
- }
- else
- {
- SettingNode = (XmlElement) (SettingsXml.SelectSingleNode(SETTINGSROOT + "/" + (new Microsoft.VisualBasic.Devices.Computer()).Name + "/" + propVal.Name));
- }
- }
- catch (Exception)
- {
- SettingNode = null;
- }
-
- //Check to see if the node exists, if so then set its new value
- if (SettingNode != null)
- {
- if (propVal.SerializedValue != null)
- {
- SettingNode.InnerText = propVal.SerializedValue.ToString();
- }
- }
- else
- {
- if (IsRoaming(propVal.Property))
- {
- //Store the value as an element of the Settings Root Node
- SettingNode = SettingsXml.CreateElement(propVal.Name);
- if (propVal.SerializedValue != null)
- {
- SettingNode.InnerText = propVal.SerializedValue.ToString();
- }
- SettingsXml.SelectSingleNode(SETTINGSROOT).AppendChild(SettingNode);
- }
- else
- {
- //Its machine specific, store as an element of the machine name node,
- //creating a new machine name node if one doesnt exist.
- try
- {
- MachineNode = (XmlElement) (SettingsXml.SelectSingleNode(SETTINGSROOT + "/" + (new Microsoft.VisualBasic.Devices.Computer()).Name));
- }
- catch (Exception)
- {
- MachineNode = SettingsXml.CreateElement((new Microsoft.VisualBasic.Devices.Computer()).Name);
- SettingsXml.SelectSingleNode(SETTINGSROOT).AppendChild(MachineNode);
- }
-
- if (MachineNode == null)
- {
- MachineNode = SettingsXml.CreateElement((new Microsoft.VisualBasic.Devices.Computer()).Name);
- SettingsXml.SelectSingleNode(SETTINGSROOT).AppendChild(MachineNode);
- }
-
- SettingNode = SettingsXml.CreateElement(propVal.Name);
- if (propVal.SerializedValue != null)
- {
- SettingNode.InnerText = propVal.SerializedValue.ToString();
- }
- MachineNode.AppendChild(SettingNode);
- }
- }
- }
-
- private bool IsRoaming(SettingsProperty prop)
- {
- //Determine if the setting is marked as Roaming
- //For Each d As DictionaryEntry In prop.Attributes
- // Dim a As Attribute = DirectCast(d.Value, Attribute)
- // If TypeOf a Is System.Configuration.SettingsManageabilityAttribute Then
- // Return True
- // End If
- //Next
- //Return False
-
- return true;
- }
- }
-}
-#endif
\ No newline at end of file
+ try
+ {
+ _rootDocument.Save(_filePath);
+ }
+ catch (Exception)
+ {
+ /*
+ * If this is a portable application and the device has been
+ * removed then this will fail, so don't do anything. It's
+ * probably better for the application to stop saving settings
+ * rather than just crashing outright. Probably.
+ */
+ }
+ }
+
+ public override SettingsPropertyValueCollection GetPropertyValues(SettingsContext context, SettingsPropertyCollection collection)
+ {
+ SettingsPropertyValueCollection values = new SettingsPropertyValueCollection();
+
+ foreach (SettingsProperty property in collection)
+ {
+ values.Add(new SettingsPropertyValue(property)
+ {
+ SerializedValue = GetValue(property)
+ });
+ }
+
+ return values;
+ }
+
+ private void SetValue(SettingsPropertyValue propertyValue)
+ {
+ XmlNode targetNode = IsGlobal(propertyValue.Property)
+ ? _globalSettingsNode
+ : _localSettingsNode;
+
+ XmlNode settingNode = targetNode.SelectSingleNode(string.Format("setting[@name='{0}']", propertyValue.Name));
+
+ if (settingNode != null)
+ settingNode.InnerText = propertyValue.SerializedValue.ToString();
+ else
+ {
+ settingNode = _rootDocument.CreateElement("setting");
+
+ XmlAttribute nameAttribute = _rootDocument.CreateAttribute("name");
+ nameAttribute.Value = propertyValue.Name;
+
+ settingNode.Attributes.Append(nameAttribute);
+ settingNode.InnerText = propertyValue.SerializedValue.ToString();
+
+ targetNode.AppendChild(settingNode);
+ }
+ }
+
+ private string GetValue(SettingsProperty property)
+ {
+ XmlNode targetNode = IsGlobal(property) ? _globalSettingsNode : _localSettingsNode;
+ XmlNode settingNode = targetNode.SelectSingleNode(string.Format("setting[@name='{0}']", property.Name));
+
+ if (settingNode == null)
+ return property.DefaultValue != null ? property.DefaultValue.ToString() : string.Empty;
+
+ return settingNode.InnerText;
+ }
+
+ private bool IsGlobal(SettingsProperty property)
+ {
+ foreach (DictionaryEntry attribute in property.Attributes)
+ {
+ if ((Attribute)attribute.Value is SettingsManageabilityAttribute)
+ return true;
+ }
+
+ return false;
+ }
+
+ private XmlNode GetSettingsNode(string name)
+ {
+ XmlNode settingsNode = _rootNode.SelectSingleNode(name);
+
+ if (settingsNode == null)
+ {
+ settingsNode = _rootDocument.CreateElement(name);
+ _rootNode.AppendChild(settingsNode);
+ }
+
+ return settingsNode;
+ }
+
+ public XmlDocument GetBlankXmlDocument()
+ {
+ XmlDocument blankXmlDocument = new XmlDocument();
+ blankXmlDocument.AppendChild(blankXmlDocument.CreateXmlDeclaration("1.0", "utf-8", string.Empty));
+ blankXmlDocument.AppendChild(blankXmlDocument.CreateElement(_rootNodeName));
+
+ return blankXmlDocument;
+ }
+
+ public void Reset(SettingsContext context)
+ {
+ _localSettingsNode.RemoveAll();
+ _globalSettingsNode.RemoveAll();
+
+ _xmlDocument.Save(_filePath);
+ }
+
+ public SettingsPropertyValue GetPreviousVersion(SettingsContext context, SettingsProperty property)
+ {
+ // do nothing
+ return new SettingsPropertyValue(property);
+ }
+
+ public void Upgrade(SettingsContext context, SettingsPropertyCollection properties)
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/mRemoteV1/Properties/Settings.Designer.cs b/mRemoteV1/Properties/Settings.Designer.cs
index c8701775d..7b389b088 100644
--- a/mRemoteV1/Properties/Settings.Designer.cs
+++ b/mRemoteV1/Properties/Settings.Designer.cs
@@ -12,7 +12,7 @@ namespace mRemoteNG {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.3.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
diff --git a/mRemoteV1/Settings.cs b/mRemoteV1/Settings.cs
new file mode 100644
index 000000000..3a481982c
--- /dev/null
+++ b/mRemoteV1/Settings.cs
@@ -0,0 +1,32 @@
+using System.Configuration;
+
+namespace mRemoteNG
+{
+
+
+ // This class allows you to handle specific events on the settings class:
+ // The SettingChanging event is raised before a setting's value is changed.
+ // The PropertyChanged event is raised after a setting's value is changed.
+ // The SettingsLoaded event is raised after the setting values are loaded.
+ // The SettingsSaving event is raised before the setting values are saved.
+ [global::System.Configuration.SettingsProviderAttribute(typeof(mRemoteNG.Config.Settings.Providers.ChooseProvider))]
+ internal sealed partial class Settings {
+
+ public Settings() {
+ // // To add event handlers for saving and changing settings, uncomment the lines below:
+ //
+ // this.SettingChanging += this.SettingChangingEventHandler;
+ //
+ // this.SettingsSaving += this.SettingsSavingEventHandler;
+ //
+ }
+
+ private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) {
+ // Add code to handle the SettingChangingEvent event here.
+ }
+
+ private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) {
+ // Add code to handle the SettingsSaving event here.
+ }
+ }
+}
diff --git a/mRemoteV1/app.config b/mRemoteV1/app.config
index 41ac45650..874423393 100644
--- a/mRemoteV1/app.config
+++ b/mRemoteV1/app.config
@@ -34,610 +34,598 @@
-
- 0, 0
-
-
- 0, 0
-
-
- Normal
-
-
- False
-
-
- True
-
-
-
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- False
-
-
- False
-
-
-
-
-
- True
-
-
- True
-
-
- False
-
-
- False
-
-
- True
-
-
- False
-
-
- False
-
-
- noinfo
-
-
-
-
-
-
-
-
-
-
-
- True
-
-
- False
-
-
- True
-
-
- False
-
-
- False
-
-
- False
-
-
-
-
-
- 80
-
-
- False
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- RDP
-
-
- Default Settings
-
-
- False
-
-
- FitToWindow
-
-
- Colors16Bit
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- DoNotPlay
-
-
- 2
-
-
- False
-
-
- False
-
-
- False
-
-
- 0
-
-
- False
-
-
- True
-
-
- 0, 0
-
-
- Bottom
-
-
- True
-
-
- 3, 24
-
-
- Top
-
-
- False
-
-
- False
-
-
-
-
-
-
-
-
-
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- EncrBasic
-
-
- False
-
-
-
-
-
-
-
-
- False
-
-
- False
-
-
- False
-
-
- True
-
-
- False
-
-
- False
-
-
- AuthVNC
-
-
- ColNormal
-
-
- SmartSAspect
-
-
- False
-
-
- CompNone
-
-
- EncHextile
-
-
-
-
-
-
-
-
- 0
-
-
- ProxyNone
-
-
-
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- NoAuth
-
-
- False
-
-
- 0
-
-
- False
-
-
- False
-
-
- False
-
-
- 5500
-
-
- False
-
-
-
-
-
- IE
-
-
- False
-
-
-
-
-
- False
-
-
- False
-
-
-
-
-
- False
-
-
-
-
-
- False
-
-
- False
-
-
- 14
-
-
- 1980-01-01
-
-
- False
-
-
- Never
-
-
- Yes
-
-
- mRemoteNG
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- 5
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- False
-
-
- False
-
-
- False
-
-
- False
-
-
- 4
-
-
- mRemoteNG
-
-
- 10
-
-
- {0}.{1:yyyyMMdd-HHmmssffff}.backup
-
-
- False
-
-
- True
-
-
- False
-
-
- False
-
-
- release
-
-
-
-
-
- True
-
-
-
-
-
-
-
-
- True
-
-
-
-
-
- True
-
-
- False
-
-
- False
-
-
- RDP
-
-
- 9/9, 33/8
-
-
- 9/8, 34/8
-
-
- False
-
-
- 20
-
-
- AES
-
-
- GCM
-
-
- 1000
-
-
- Dynamic
-
-
- False
-
-
- 0
-
-
- False
-
-
- False
-
-
- False
-
+
+ 0, 0
+
+
+ 0, 0
+
+
+ Normal
+
+
+ False
+
+
+ True
+
+
+
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ False
+
+
+ False
+
+
+
+
+
+ True
+
+
+ True
+
+
+ False
+
+
+ False
+
+
+ True
+
+
+ False
+
+
+ False
+
+
+ noinfo
+
+
+
+
+
+
+
+
+
+
+
+ True
+
+
+ False
+
+
+ True
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+
+
+
+ 80
+
+
+ False
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ RDP
+
+
+ Default Settings
+
+
+ False
+
+
+ FitToWindow
+
+
+ Colors16Bit
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ DoNotPlay
+
+
+ 2
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ 0
+
+
+ False
+
+
+ True
+
+
+ 0, 0
+
+
+ Bottom
+
+
+ True
+
+
+ 3, 24
+
+
+ Top
+
+
+ False
+
+
+ False
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ EncrBasic
+
+
+ False
+
+
+
+
+
+
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ True
+
+
+ False
+
+
+ False
+
+
+ AuthVNC
+
+
+ ColNormal
+
+
+ SmartSAspect
+
+
+ False
+
+
+ CompNone
+
+
+ EncHextile
+
+
+
+
+
+
+
+
+ 0
+
+
+ ProxyNone
+
+
+
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ NoAuth
+
+
+ False
+
+
+ 5500
+
+
+ False
+
+
+
+
+
+ IE
+
+
+ False
+
+
+
+
+
+ False
+
+
+ False
+
+
+
+
+
+ False
+
+
+
+
+
+ False
+
+
+ False
+
+
+ 14
+
+
+ 1980-01-01
+
+
+ False
+
+
+ Never
+
+
+ Yes
+
+
+ mRemoteNG
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ 5
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ False
+
+
+ 4
+
+
+ mRemoteNG
+
+
+ 10
+
+
+ {0}.{1:yyyyMMdd-HHmmssffff}.backup
+
+
+ False
+
+
+ True
+
+
+ False
+
+
+ False
+
+
+ release
+
+
+
+
+
+ True
+
+
+
+
+
+
+
+
+ True
+
+
+
+
+
+ True
+
+
+ False
+
+
+ False
+
+
+ RDP
+
+
+ 9/9, 33/8
+
+
+ 9/8, 34/8
+
+
+ False
+
+
+ 20
+
+
+ AES
+
+
+ GCM
+
+
+ 1000
+
+
+ Dynamic
+
+
+ False
+
+
+ 0
+
+
+ False
+
+
+ False
+
+
+ False
+
-
- de,el,en,en-US,es-AR,es,fr,hu,it,ja-JP,nb-NO,nl,pt,pt-BR,pl,ru,uk,tr-TR,zh-CN,zh-TW
-
-
- https://mremoteng.org/
-
+
+ de,el,en,en-US,es-AR,es,fr,hu,it,ja-JP,nb-NO,nl,pt,pt-BR,pl,ru,uk,tr-TR,zh-CN,zh-TW
+
+
+ https://mremoteng.org/
+
diff --git a/mRemoteV1/mRemoteV1.csproj b/mRemoteV1/mRemoteV1.csproj
index 3d2f5e95a..667b6dd38 100644
--- a/mRemoteV1/mRemoteV1.csproj
+++ b/mRemoteV1/mRemoteV1.csproj
@@ -82,6 +82,7 @@
True
+
@@ -161,7 +162,6 @@
-
@@ -206,6 +206,7 @@
+