diff --git a/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormatTests.cs b/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormatTests.cs index 92d844b0..8dfeeebc 100644 --- a/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormatTests.cs +++ b/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormatTests.cs @@ -83,6 +83,7 @@ namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Csv PostExtApp = "SomePostExtApp", MacAddress = "SomeMacAddress", UserField = "SomeUserField", + Favorite = true, ExtApp = "SomeExtApp", VNCProxyUsername = "SomeVNCProxyUsername", VNCProxyPassword = "SomeVNCProxyPassword", diff --git a/mRemoteNGTests/TestHelpers/ConnectionInfoHelpers.cs b/mRemoteNGTests/TestHelpers/ConnectionInfoHelpers.cs index 81e8eb51..d920923b 100644 --- a/mRemoteNGTests/TestHelpers/ConnectionInfoHelpers.cs +++ b/mRemoteNGTests/TestHelpers/ConnectionInfoHelpers.cs @@ -63,10 +63,11 @@ namespace mRemoteNGTests.TestHelpers RedirectSmartCards = RandomBool(), UseConsoleSession = RandomBool(), UseCredSsp = RandomBool(), - VNCViewOnly = RandomBool(), + VNCViewOnly = RandomBool(), + Favorite = RandomBool(), - // ints - Port = RandomInt(), + // ints + Port = RandomInt(), RDPMinutesToIdleTimeout = RandomInt(), VNCProxyPort = RandomInt(), diff --git a/mRemoteNGTests/TestHelpers/SerializableConnectionInfoAllPropertiesOfType.cs b/mRemoteNGTests/TestHelpers/SerializableConnectionInfoAllPropertiesOfType.cs index de17b756..61ca6f5d 100644 --- a/mRemoteNGTests/TestHelpers/SerializableConnectionInfoAllPropertiesOfType.cs +++ b/mRemoteNGTests/TestHelpers/SerializableConnectionInfoAllPropertiesOfType.cs @@ -48,8 +48,9 @@ public TType PreExtApp { get; set; } public TType PostExtApp { get; set; } public TType MacAddress { get; set; } - public TType UserField { get; set; } - public TType VNCCompression { get; set; } + public TType UserField { get; set; } + public TType Favorite { get; set; } + public TType VNCCompression { get; set; } public TType VNCEncoding { get; set; } public TType VNCAuthMode { get; set; } public TType VNCProxyType { get; set; } diff --git a/mRemoteV1/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsSerializerMremotengFormat.cs b/mRemoteV1/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsSerializerMremotengFormat.cs index ab99f6ea..eb8f77dc 100644 --- a/mRemoteV1/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsSerializerMremotengFormat.cs +++ b/mRemoteV1/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsSerializerMremotengFormat.cs @@ -56,10 +56,10 @@ namespace mRemoteNG.Config.Serializers.Csv if (_saveFilter.SaveDomain) sb.Append("Domain;"); sb.Append( - "Hostname;Protocol;PuttySession;Port;ConnectToConsole;UseCredSsp;RenderingEngine;ICAEncryptionStrength;RDPAuthenticationLevel;LoadBalanceInfo;Colors;Resolution;AutomaticResize;DisplayWallpaper;DisplayThemes;EnableFontSmoothing;EnableDesktopComposition;CacheBitmaps;RedirectDiskDrives;RedirectPorts;RedirectPrinters;RedirectClipboard;RedirectSmartCards;RedirectSound;RedirectKeys;PreExtApp;PostExtApp;MacAddress;UserField;ExtApp;VNCCompression;VNCEncoding;VNCAuthMode;VNCProxyType;VNCProxyIP;VNCProxyPort;VNCProxyUsername;VNCProxyPassword;VNCColors;VNCSmartSizeMode;VNCViewOnly;RDGatewayUsageMethod;RDGatewayHostname;RDGatewayUseConnectionCredentials;RDGatewayUsername;RDGatewayPassword;RDGatewayDomain;"); + "Hostname;Protocol;PuttySession;Port;ConnectToConsole;UseCredSsp;RenderingEngine;ICAEncryptionStrength;RDPAuthenticationLevel;LoadBalanceInfo;Colors;Resolution;AutomaticResize;DisplayWallpaper;DisplayThemes;EnableFontSmoothing;EnableDesktopComposition;CacheBitmaps;RedirectDiskDrives;RedirectPorts;RedirectPrinters;RedirectClipboard;RedirectSmartCards;RedirectSound;RedirectKeys;PreExtApp;PostExtApp;MacAddress;UserField;ExtApp;Favorite;VNCCompression;VNCEncoding;VNCAuthMode;VNCProxyType;VNCProxyIP;VNCProxyPort;VNCProxyUsername;VNCProxyPassword;VNCColors;VNCSmartSizeMode;VNCViewOnly;RDGatewayUsageMethod;RDGatewayHostname;RDGatewayUseConnectionCredentials;RDGatewayUsername;RDGatewayPassword;RDGatewayDomain;"); if (_saveFilter.SaveInheritance) sb.Append( - "InheritCacheBitmaps;InheritColors;InheritDescription;InheritDisplayThemes;InheritDisplayWallpaper;InheritEnableFontSmoothing;InheritEnableDesktopComposition;InheritDomain;InheritIcon;InheritPanel;InheritPassword;InheritPort;InheritProtocol;InheritPuttySession;InheritRedirectDiskDrives;InheritRedirectKeys;InheritRedirectPorts;InheritRedirectPrinters;InheritRedirectClipboard;InheritRedirectSmartCards;InheritRedirectSound;InheritResolution;InheritAutomaticResize;InheritUseConsoleSession;InheritUseCredSsp;InheritRenderingEngine;InheritUsername;InheritICAEncryptionStrength;InheritRDPAuthenticationLevel;InheritLoadBalanceInfo;InheritPreExtApp;InheritPostExtApp;InheritMacAddress;InheritUserField;InheritExtApp;InheritVNCCompression;InheritVNCEncoding;InheritVNCAuthMode;InheritVNCProxyType;InheritVNCProxyIP;InheritVNCProxyPort;InheritVNCProxyUsername;InheritVNCProxyPassword;InheritVNCColors;InheritVNCSmartSizeMode;InheritVNCViewOnly;InheritRDGatewayUsageMethod;InheritRDGatewayHostname;InheritRDGatewayUseConnectionCredentials;InheritRDGatewayUsername;InheritRDGatewayPassword;InheritRDGatewayDomain;InheritRDPAlertIdleTimeout;InheritRDPMinutesToIdleTimeout;InheritSoundQuality"); + "InheritCacheBitmaps;InheritColors;InheritDescription;InheritDisplayThemes;InheritDisplayWallpaper;InheritEnableFontSmoothing;InheritEnableDesktopComposition;InheritDomain;InheritIcon;InheritPanel;InheritPassword;InheritPort;InheritProtocol;InheritPuttySession;InheritRedirectDiskDrives;InheritRedirectKeys;InheritRedirectPorts;InheritRedirectPrinters;InheritRedirectClipboard;InheritRedirectSmartCards;InheritRedirectSound;InheritResolution;InheritAutomaticResize;InheritUseConsoleSession;InheritUseCredSsp;InheritRenderingEngine;InheritUsername;InheritICAEncryptionStrength;InheritRDPAuthenticationLevel;InheritLoadBalanceInfo;InheritPreExtApp;InheritPostExtApp;InheritMacAddress;InheritUserField;InheritFavorite;InheritExtApp;InheritVNCCompression;InheritVNCEncoding;InheritVNCAuthMode;InheritVNCProxyType;InheritVNCProxyIP;InheritVNCProxyPort;InheritVNCProxyUsername;InheritVNCProxyPassword;InheritVNCColors;InheritVNCSmartSizeMode;InheritVNCViewOnly;InheritRDGatewayUsageMethod;InheritRDGatewayHostname;InheritRDGatewayUseConnectionCredentials;InheritRDGatewayUsername;InheritRDGatewayPassword;InheritRDGatewayDomain;InheritRDPAlertIdleTimeout;InheritRDPMinutesToIdleTimeout;InheritSoundQuality"); } private void SerializeNodesRecursive(ConnectionInfo node, StringBuilder sb) diff --git a/mRemoteV1/Connection/ConnectionInfo.cs b/mRemoteV1/Connection/ConnectionInfo.cs index a8b27741..53190f58 100644 --- a/mRemoteV1/Connection/ConnectionInfo.cs +++ b/mRemoteV1/Connection/ConnectionInfo.cs @@ -34,9 +34,6 @@ namespace mRemoteNG.Connection [Browsable(false)] public ContainerInfo Parent { get; internal set; } - //[Browsable(false)] - //private int PositionID { get; set; } - [Browsable(false)] // ReSharper disable once UnusedAutoPropertyAccessor.Global public bool IsQuickConnect { get; set; } @@ -213,15 +210,17 @@ namespace mRemoteNG.Connection var parentPropertyInfo = connectionInfoType.GetProperty(propertyName); if (parentPropertyInfo == null) throw new NullReferenceException( - $"Could not retrieve property data for property '{propertyName}' on parent node '{Parent?.Name}'"); + $"Could not retrieve property data for property '{propertyName}' on parent node '{Parent?.Name}'" + ); inheritedValue = (TPropertyType)parentPropertyInfo.GetValue(Parent, null); return true; } catch (Exception e) { - Runtime.MessageCollector.AddExceptionStackTrace($"Error retrieving inherited property '{propertyName}'", - e); + Runtime.MessageCollector.AddExceptionStackTrace( + $"Error retrieving inherited property '{propertyName}'", e + ); inheritedValue = default(TPropertyType); return false; }