diff --git a/mRemoteNG/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormat.cs b/mRemoteNG/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormat.cs index ca2653be4..f445fac85 100644 --- a/mRemoteNG/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormat.cs +++ b/mRemoteNG/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormat.cs @@ -101,6 +101,10 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv ? connectionCsv[headers.IndexOf("Panel")] : ""; + connectionRecord.Username = headers.Contains("UserViaAPI") + ? connectionCsv[headers.IndexOf("UserViaAPI")] + : ""; + connectionRecord.Username = headers.Contains("Username") ? connectionCsv[headers.IndexOf("Username")] : ""; @@ -650,6 +654,12 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv connectionRecord.Inheritance.RenderingEngine = value; } + if (headers.Contains("InheritUserViaAPI")) + { + if (bool.TryParse(connectionCsv[headers.IndexOf("InheritUserViaAPI")], out bool value)) + connectionRecord.Inheritance.UserViaAPI = value; + } + if (headers.Contains("InheritUsername")) { if (bool.TryParse(connectionCsv[headers.IndexOf("InheritUsername")], out bool value)) diff --git a/mRemoteNG/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsSerializerMremotengFormat.cs b/mRemoteNG/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsSerializerMremotengFormat.cs index 0a0bb7537..5952bc3b9 100644 --- a/mRemoteNG/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsSerializerMremotengFormat.cs +++ b/mRemoteNG/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsSerializerMremotengFormat.cs @@ -61,7 +61,7 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv "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;RedirectAudioCapture;RdpVersion;RDPStartProgram;RDPStartProgramWorkDir;"); + "RDGatewayUseConnectionCredentials;RDGatewayUsername;RDGatewayPassword;RDGatewayDomain;RedirectAudioCapture;RdpVersion;RDPStartProgram;RDPStartProgramWorkDir;UserViaAPI;EC2InstanceId;EC2Region;"); if (_saveFilter.SaveInheritance) sb.Append("InheritCacheBitmaps;InheritColors;InheritDescription;InheritDisplayThemes;InheritDisplayWallpaper;" + @@ -73,7 +73,7 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv "InheritFavorite;InheritExtApp;InheritVNCCompression;InheritVNCEncoding;InheritVNCAuthMode;InheritVNCProxyType;InheritVNCProxyIP;" + "InheritVNCProxyPort;InheritVNCProxyUsername;InheritVNCProxyPassword;InheritVNCColors;InheritVNCSmartSizeMode;InheritVNCViewOnly;" + "InheritRDGatewayUsageMethod;InheritRDGatewayHostname;InheritRDGatewayUseConnectionCredentials;InheritRDGatewayUsername;" + - "InheritRDGatewayPassword;InheritRDGatewayDomain;InheritRDPAlertIdleTimeout;InheritRDPMinutesToIdleTimeout;InheritSoundQuality;" + + "InheritRDGatewayPassword;InheritRDGatewayDomain;InheritRDPAlertIdleTimeout;InheritRDPMinutesToIdleTimeout;InheritSoundQuality;InheritUserViaAPI;" + "InheritRedirectAudioCapture;InheritRdpVersion"); } @@ -175,7 +175,10 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv .Append(FormatForCsv(con.RedirectAudioCapture)) .Append(FormatForCsv(con.RdpVersion)) .Append(FormatForCsv(con.RDPStartProgram)) - .Append(FormatForCsv(con.RDPStartProgramWorkDir)); + .Append(FormatForCsv(con.RDPStartProgramWorkDir)) + .Append(FormatForCsv(con.UserViaAPI)) + .Append(FormatForCsv(con.EC2InstanceId)) + .Append(FormatForCsv(con.EC2Region)); if (!_saveFilter.SaveInheritance) @@ -247,7 +250,8 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Csv .Append(FormatForCsv(con.Inheritance.RDPMinutesToIdleTimeout)) .Append(FormatForCsv(con.Inheritance.SoundQuality)) .Append(FormatForCsv(con.Inheritance.RedirectAudioCapture)) - .Append(FormatForCsv(con.Inheritance.RdpVersion)); + .Append(FormatForCsv(con.Inheritance.RdpVersion)) + .Append(FormatForCsv(con.Inheritance.UserViaAPI)); } private string FormatForCsv(object value) diff --git a/mRemoteNG/Schemas/mremoteng_confcons_v2_7.xsd b/mRemoteNG/Schemas/mremoteng_confcons_v2_7.xsd index 3c580aef2..7305756bd 100644 --- a/mRemoteNG/Schemas/mremoteng_confcons_v2_7.xsd +++ b/mRemoteNG/Schemas/mremoteng_confcons_v2_7.xsd @@ -172,5 +172,8 @@ + + + \ No newline at end of file diff --git a/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormatTests.cs b/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormatTests.cs index c55f2d261..e3f9aedae 100644 --- a/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormatTests.cs +++ b/mRemoteNGTests/Config/Serializers/ConnectionSerializers/Csv/CsvConnectionsDeserializerMremotengFormatTests.cs @@ -129,7 +129,10 @@ namespace mRemoteNGTests.Config.Serializers.ConnectionSerializers.Csv VNCSmartSizeMode = ProtocolVNC.SmartSizeMode.SmartSAspect, VNCViewOnly = true, RDGatewayUsageMethod = RDGatewayUsageMethod.Detect, - RDGatewayUseConnectionCredentials = RDGatewayUseConnectionCredentials.SmartCard + RDGatewayUseConnectionCredentials = RDGatewayUseConnectionCredentials.SmartCard, + UserViaAPI = "", + EC2InstanceId = "", + EC2Region = "eu-central-1" }; } diff --git a/mRemoteNGTests/TestHelpers/SerializableConnectionInfoAllPropertiesOfType.cs b/mRemoteNGTests/TestHelpers/SerializableConnectionInfoAllPropertiesOfType.cs index d4ffab640..afcf04fe8 100644 --- a/mRemoteNGTests/TestHelpers/SerializableConnectionInfoAllPropertiesOfType.cs +++ b/mRemoteNGTests/TestHelpers/SerializableConnectionInfoAllPropertiesOfType.cs @@ -75,5 +75,8 @@ public TType RDPStartProgram { get; set; } public TType RDPStartProgramWorkDir { get; set; } public TType OpeningCommand { get; set; } + public TType UserViaAPI { get; set; } + public TType EC2InstanceId { get; set; } + public TType EC2Region { get; set; } } }