mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
Merge pull request #2104 from tecxx/develop-orig
fix test cases caused by new fields
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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>
|
||||
@@ -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"
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user