Merge branch 'develop' of https://github.com/mRemoteNG/mRemoteNG into develop

This commit is contained in:
Dimitrij
2022-01-04 10:43:12 +00:00
5 changed files with 28 additions and 5 deletions

View File

@@ -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))

View File

@@ -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)

View File

@@ -172,5 +172,8 @@
<xs:attribute name="StartProgram" type="xs:string" use="optional" />
<xs:attribute name="StartProgramWorkDir" type="xs:string" use="optional" />
<xs:attribute name="OpeningCommand" type="xs:string" use="optional" />
<xs:attribute name="UserViaAPI" type="xs:string" use="optional" />
<xs:attribute name="EC2InstanceId" type="xs:string" use="optional" />
<xs:attribute name="EC2Region" type="xs:string" use="optional" />
</xs:complexType>
</xs:schema>

View File

@@ -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"
};
}

View File

@@ -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; }
}
}