diff --git a/mRemoteNGTests/Config/Serializers/MiscSerializers/CsvConnectionsDeserializerMremotengFormatTests.cs b/mRemoteNGTests/Config/Serializers/MiscSerializers/CsvConnectionsDeserializerMremotengFormatTests.cs index 37abc353..1421314c 100644 --- a/mRemoteNGTests/Config/Serializers/MiscSerializers/CsvConnectionsDeserializerMremotengFormatTests.cs +++ b/mRemoteNGTests/Config/Serializers/MiscSerializers/CsvConnectionsDeserializerMremotengFormatTests.cs @@ -82,9 +82,9 @@ namespace mRemoteNGTests.Config.Serializers.MiscSerializers UseCredSsp = true, RenderingEngine = HTTPBase.RenderingEngine.Gecko, ICAEncryptionStrength = IcaProtocol.EncryptionStrength.Encr40Bit, - RDPAuthenticationLevel = RdpProtocol.AuthenticationLevel.WarnOnFailedAuth, - Colors = RdpProtocol.RdpColors.Colors16Bit, - Resolution = RdpProtocol.RdpResolutions.Res1366x768, + RDPAuthenticationLevel = RdpAuthenticationLevel.WarnOnFailedAuth, + Colors = RdpColors.Colors16Bit, + Resolution = RdpResolutions.Res1366x768, AutomaticResize = true, DisplayWallpaper = true, DisplayThemes = true, @@ -95,7 +95,7 @@ namespace mRemoteNGTests.Config.Serializers.MiscSerializers RedirectPorts = true, RedirectPrinters = true, RedirectSmartCards = true, - RedirectSound = RdpProtocol.RdpSounds.LeaveAtRemoteComputer, + RedirectSound = RdpSounds.LeaveAtRemoteComputer, RedirectKeys = true, VNCCompression = ProtocolVNC.Compression.Comp4, VNCEncoding = ProtocolVNC.Encoding.EncRRE, @@ -105,8 +105,8 @@ namespace mRemoteNGTests.Config.Serializers.MiscSerializers VNCColors = ProtocolVNC.Colors.Col8Bit, VNCSmartSizeMode = ProtocolVNC.SmartSizeMode.SmartSAspect, VNCViewOnly = true, - RDGatewayUsageMethod = RdpProtocol.RDGatewayUsageMethod.Detect, - RDGatewayUseConnectionCredentials = RdpProtocol.RDGatewayUseConnectionCredentials.SmartCard + RDGatewayUsageMethod = RDGatewayUsageMethod.Detect, + RDGatewayUseConnectionCredentials = RDGatewayUseConnectionCredentials.SmartCard }; } diff --git a/mRemoteNGTests/Config/Serializers/MiscSerializers/RemoteDesktopConnectionDeserializerTests.cs b/mRemoteNGTests/Config/Serializers/MiscSerializers/RemoteDesktopConnectionDeserializerTests.cs index 3fa3cec7..3450badc 100644 --- a/mRemoteNGTests/Config/Serializers/MiscSerializers/RemoteDesktopConnectionDeserializerTests.cs +++ b/mRemoteNGTests/Config/Serializers/MiscSerializers/RemoteDesktopConnectionDeserializerTests.cs @@ -18,9 +18,9 @@ namespace mRemoteNGTests.Config.Serializers.MiscSerializers private const string ExpectedDomain = "myspecialdomain"; private const string ExpectedGatewayHostname = "gatewayhostname.domain.com"; private const int ExpectedPort = 9933; - private const RdpProtocol.RdpColors ExpectedColors = RdpProtocol.RdpColors.Colors24Bit; + private const RdpColors ExpectedColors = RdpColors.Colors24Bit; private const bool ExpectedBitmapCaching = false; - private const RdpProtocol.RdpResolutions ExpectedResolutionMode = RdpProtocol.RdpResolutions.FitToWindow; + private const RdpResolutions ExpectedResolutionMode = RdpResolutions.FitToWindow; private const bool ExpectedWallpaperDisplay = true; private const bool ExpectedThemesDisplay = true; private const bool ExpectedFontSmoothing = true; @@ -29,7 +29,7 @@ namespace mRemoteNGTests.Config.Serializers.MiscSerializers private const bool ExpectedDriveRedirection = true; private const bool ExpectedPortRedirection = true; private const bool ExpectedPrinterRedirection = true; - private const RdpProtocol.RdpSounds ExpectedSoundRedirection = RdpProtocol.RdpSounds.BringToThisComputer; + private const RdpSounds ExpectedSoundRedirection = RdpSounds.BringToThisComputer; [OneTimeSetUp] diff --git a/mRemoteNGTests/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManager27DeserializerTests.cs b/mRemoteNGTests/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManager27DeserializerTests.cs index f4d1939c..31bdd93e 100644 --- a/mRemoteNGTests/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManager27DeserializerTests.cs +++ b/mRemoteNGTests/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManager27DeserializerTests.cs @@ -23,20 +23,20 @@ namespace mRemoteNGTests.Config.Serializers.MiscSerializers private const string ExpectedPassword = "passwordHere!"; private const bool ExpectedUseConsoleSession = true; private const int ExpectedPort = 9933; - private const RdpProtocol.RDGatewayUsageMethod ExpectedGatewayUsageMethod = RdpProtocol.RDGatewayUsageMethod.Always; + private const RDGatewayUsageMethod ExpectedGatewayUsageMethod = RDGatewayUsageMethod.Always; private const string ExpectedGatewayHostname = "gatewayserverhost.innerdomain.net"; private const string ExpectedGatewayUsername = "gatewayusername"; private const string ExpectedGatewayDomain = "innerdomain"; private const string ExpectedGatewayPassword = "gatewayPassword123"; - private const RdpProtocol.RdpResolutions ExpectedRdpResolution = RdpProtocol.RdpResolutions.FitToWindow; - private const RdpProtocol.RdpColors ExpectedRdpColorDepth = RdpProtocol.RdpColors.Colors24Bit; - private const RdpProtocol.RdpSounds ExpectedAudioRedirection = RdpProtocol.RdpSounds.DoNotPlay; + private const RdpResolutions ExpectedRdpResolution = RdpResolutions.FitToWindow; + private const RdpColors ExpectedRdpColorDepth = RdpColors.Colors24Bit; + private const RdpSounds ExpectedAudioRedirection = RdpSounds.DoNotPlay; private const bool ExpectedKeyRedirection = true; private const bool ExpectedSmartcardRedirection = true; private const bool ExpectedDriveRedirection = true; private const bool ExpectedPortRedirection = true; private const bool ExpectedPrinterRedirection = true; - private const RdpProtocol.AuthenticationLevel ExpectedAuthLevel = RdpProtocol.AuthenticationLevel.WarnOnFailedAuth; + private const RdpAuthenticationLevel ExpectedAuthLevel = RdpAuthenticationLevel.WarnOnFailedAuth; [OneTimeSetUp] diff --git a/mRemoteNGTests/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManagerDeserializerTests.cs b/mRemoteNGTests/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManagerDeserializerTests.cs index 81b106e0..da91e321 100644 --- a/mRemoteNGTests/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManagerDeserializerTests.cs +++ b/mRemoteNGTests/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManagerDeserializerTests.cs @@ -23,20 +23,20 @@ namespace mRemoteNGTests.Config.Serializers.MiscSerializers private const string ExpectedPassword = "passwordHere!"; private const bool ExpectedUseConsoleSession = true; private const int ExpectedPort = 9933; - private const RdpProtocol.RDGatewayUsageMethod ExpectedGatewayUsageMethod = RdpProtocol.RDGatewayUsageMethod.Always; + private const RDGatewayUsageMethod ExpectedGatewayUsageMethod = RDGatewayUsageMethod.Always; private const string ExpectedGatewayHostname = "gatewayserverhost.innerdomain.net"; private const string ExpectedGatewayUsername = "gatewayusername"; private const string ExpectedGatewayDomain = "innerdomain"; private const string ExpectedGatewayPassword = "gatewayPassword123"; - private const RdpProtocol.RdpResolutions ExpectedRdpResolution = RdpProtocol.RdpResolutions.FitToWindow; - private const RdpProtocol.RdpColors ExpectedRdpColorDepth = RdpProtocol.RdpColors.Colors24Bit; - private const RdpProtocol.RdpSounds ExpectedAudioRedirection = RdpProtocol.RdpSounds.DoNotPlay; + private const RdpResolutions ExpectedRdpResolution = RdpResolutions.FitToWindow; + private const RdpColors ExpectedRdpColorDepth = RdpColors.Colors24Bit; + private const RdpSounds ExpectedAudioRedirection = RdpSounds.DoNotPlay; private const bool ExpectedKeyRedirection = true; private const bool ExpectedSmartcardRedirection = true; private const bool ExpectedDriveRedirection = true; private const bool ExpectedPortRedirection = true; private const bool ExpectedPrinterRedirection = true; - private const RdpProtocol.AuthenticationLevel ExpectedAuthLevel = RdpProtocol.AuthenticationLevel.AuthRequired; + private const RdpAuthenticationLevel ExpectedAuthLevel = RdpAuthenticationLevel.AuthRequired; [OneTimeSetUp] diff --git a/mRemoteNGTests/Connection/AbstractConnectionInfoDataTests.cs b/mRemoteNGTests/Connection/AbstractConnectionInfoDataTests.cs index 8e65e0a3..0a340c59 100644 --- a/mRemoteNGTests/Connection/AbstractConnectionInfoDataTests.cs +++ b/mRemoteNGTests/Connection/AbstractConnectionInfoDataTests.cs @@ -160,7 +160,7 @@ namespace mRemoteNGTests.Connection { var wasCalled = false; _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.RDPAuthenticationLevel = RdpProtocol.AuthenticationLevel.AuthRequired; + _testAbstractConnectionInfoData.RDPAuthenticationLevel = RdpAuthenticationLevel.AuthRequired; Assert.That(wasCalled, Is.True); } @@ -196,7 +196,7 @@ namespace mRemoteNGTests.Connection { var wasCalled = false; _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.RDGatewayUsageMethod = RdpProtocol.RDGatewayUsageMethod.Always; + _testAbstractConnectionInfoData.RDGatewayUsageMethod = RDGatewayUsageMethod.Always; Assert.That(wasCalled, Is.True); } @@ -214,7 +214,7 @@ namespace mRemoteNGTests.Connection { var wasCalled = false; _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.RDGatewayUseConnectionCredentials = RdpProtocol.RDGatewayUseConnectionCredentials.SmartCard; + _testAbstractConnectionInfoData.RDGatewayUseConnectionCredentials = RDGatewayUseConnectionCredentials.SmartCard; Assert.That(wasCalled, Is.True); } @@ -250,7 +250,7 @@ namespace mRemoteNGTests.Connection { var wasCalled = false; _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.Resolution = RdpProtocol.RdpResolutions.Res1366x768; + _testAbstractConnectionInfoData.Resolution = RdpResolutions.Res1366x768; Assert.That(wasCalled, Is.True); } @@ -268,7 +268,7 @@ namespace mRemoteNGTests.Connection { var wasCalled = false; _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.Colors = RdpProtocol.RdpColors.Colors16Bit; + _testAbstractConnectionInfoData.Colors = RdpColors.Colors16Bit; Assert.That(wasCalled, Is.True); } @@ -367,7 +367,7 @@ namespace mRemoteNGTests.Connection { var wasCalled = false; _testAbstractConnectionInfoData.PropertyChanged += (sender, args) => wasCalled = true; - _testAbstractConnectionInfoData.RedirectSound = RdpProtocol.RdpSounds.DoNotPlay; + _testAbstractConnectionInfoData.RedirectSound = RdpSounds.DoNotPlay; Assert.That(wasCalled, Is.True); } diff --git a/mRemoteV1/Config/Serializers/ConnectionSerializers/XmlConnectionsDeserializer.cs b/mRemoteV1/Config/Serializers/ConnectionSerializers/XmlConnectionsDeserializer.cs index 83e3124e..bcb671d4 100644 --- a/mRemoteV1/Config/Serializers/ConnectionSerializers/XmlConnectionsDeserializer.cs +++ b/mRemoteV1/Config/Serializers/ConnectionSerializers/XmlConnectionsDeserializer.cs @@ -219,7 +219,7 @@ namespace mRemoteNG.Config.Serializers if (_confVersion < 1.1) //1.0 - 0.1 { - connectionInfo.Resolution = Convert.ToBoolean(xmlnode.Attributes["Fullscreen"].Value) ? RdpProtocol.RdpResolutions.Fullscreen : RdpProtocol.RdpResolutions.FitToWindow; + connectionInfo.Resolution = Convert.ToBoolean(xmlnode.Attributes["Fullscreen"].Value) ? RdpResolutions.Fullscreen : RdpResolutions.FitToWindow; } if (_confVersion <= 2.6) // 0.2 - 2.6 @@ -307,34 +307,34 @@ namespace mRemoteNG.Config.Serializers if (_confVersion >= 1.3) { - connectionInfo.Colors = (RdpProtocol.RdpColors)MiscTools.StringToEnum(typeof(RdpProtocol.RdpColors), xmlnode.Attributes["Colors"].Value); - connectionInfo.Resolution = (RdpProtocol.RdpResolutions)MiscTools.StringToEnum(typeof(RdpProtocol.RdpResolutions), Convert.ToString(xmlnode.Attributes["Resolution"].Value)); - connectionInfo.RedirectSound = (RdpProtocol.RdpSounds)MiscTools.StringToEnum(typeof(RdpProtocol.RdpSounds), Convert.ToString(xmlnode.Attributes["RedirectSound"].Value)); + connectionInfo.Colors = (RdpColors)MiscTools.StringToEnum(typeof(RdpColors), xmlnode.Attributes["Colors"].Value); + connectionInfo.Resolution = (RdpResolutions)MiscTools.StringToEnum(typeof(RdpResolutions), Convert.ToString(xmlnode.Attributes["Resolution"].Value)); + connectionInfo.RedirectSound = (RdpSounds)MiscTools.StringToEnum(typeof(RdpSounds), Convert.ToString(xmlnode.Attributes["RedirectSound"].Value)); } else { switch (Convert.ToInt32(xmlnode.Attributes["Colors"].Value)) { case 0: - connectionInfo.Colors = RdpProtocol.RdpColors.Colors256; + connectionInfo.Colors = RdpColors.Colors256; break; case 1: - connectionInfo.Colors = RdpProtocol.RdpColors.Colors16Bit; + connectionInfo.Colors = RdpColors.Colors16Bit; break; case 2: - connectionInfo.Colors = RdpProtocol.RdpColors.Colors24Bit; + connectionInfo.Colors = RdpColors.Colors24Bit; break; case 3: - connectionInfo.Colors = RdpProtocol.RdpColors.Colors32Bit; + connectionInfo.Colors = RdpColors.Colors32Bit; break; // ReSharper disable once RedundantCaseLabel case 4: default: - connectionInfo.Colors = RdpProtocol.RdpColors.Colors15Bit; + connectionInfo.Colors = RdpColors.Colors15Bit; break; } - connectionInfo.RedirectSound = (RdpProtocol.RdpSounds)Convert.ToInt32(xmlnode.Attributes["RedirectSound"].Value); + connectionInfo.RedirectSound = (RdpSounds)Convert.ToInt32(xmlnode.Attributes["RedirectSound"].Value); } if (_confVersion >= 1.3) @@ -421,7 +421,7 @@ namespace mRemoteNG.Config.Serializers if (_confVersion >= 1.8) { - connectionInfo.RDPAuthenticationLevel = (RdpProtocol.AuthenticationLevel)MiscTools.StringToEnum(typeof(RdpProtocol.AuthenticationLevel), xmlnode.Attributes["RDPAuthenticationLevel"].Value); + connectionInfo.RDPAuthenticationLevel = (RdpAuthenticationLevel)MiscTools.StringToEnum(typeof(RdpAuthenticationLevel), xmlnode.Attributes["RDPAuthenticationLevel"].Value); connectionInfo.Inheritance.RDPAuthenticationLevel = bool.Parse(xmlnode.Attributes["InheritRDPAuthenticationLevel"].Value); } @@ -448,9 +448,9 @@ namespace mRemoteNG.Config.Serializers if (_confVersion >= 2.2) { // Get settings - connectionInfo.RDGatewayUsageMethod = (RdpProtocol.RDGatewayUsageMethod)MiscTools.StringToEnum(typeof(RdpProtocol.RDGatewayUsageMethod), Convert.ToString(xmlnode.Attributes["RDGatewayUsageMethod"].Value)); + connectionInfo.RDGatewayUsageMethod = (RDGatewayUsageMethod)MiscTools.StringToEnum(typeof(RDGatewayUsageMethod), Convert.ToString(xmlnode.Attributes["RDGatewayUsageMethod"].Value)); connectionInfo.RDGatewayHostname = xmlnode.Attributes["RDGatewayHostname"].Value; - connectionInfo.RDGatewayUseConnectionCredentials = (RdpProtocol.RDGatewayUseConnectionCredentials)MiscTools.StringToEnum(typeof(RdpProtocol.RDGatewayUseConnectionCredentials), Convert.ToString(xmlnode.Attributes["RDGatewayUseConnectionCredentials"].Value)); + connectionInfo.RDGatewayUseConnectionCredentials = (RDGatewayUseConnectionCredentials)MiscTools.StringToEnum(typeof(RDGatewayUseConnectionCredentials), Convert.ToString(xmlnode.Attributes["RDGatewayUseConnectionCredentials"].Value)); connectionInfo.RDGatewayUsername = xmlnode.Attributes["RDGatewayUsername"].Value; connectionInfo.RDGatewayPassword = _decryptor.Decrypt(Convert.ToString(xmlnode.Attributes["RDGatewayPassword"].Value)); connectionInfo.RDGatewayDomain = xmlnode.Attributes["RDGatewayDomain"].Value; @@ -492,7 +492,7 @@ namespace mRemoteNG.Config.Serializers if (_confVersion >= 2.6) { connectionInfo.ConstantID = xmlnode.Attributes["Id"]?.Value ?? connectionInfo.ConstantID; - connectionInfo.SoundQuality = (RdpProtocol.RdpSoundQuality)MiscTools.StringToEnum(typeof(RdpProtocol.RdpSoundQuality), Convert.ToString(xmlnode.Attributes["SoundQuality"].Value)); + connectionInfo.SoundQuality = (RdpSoundQuality)MiscTools.StringToEnum(typeof(RdpSoundQuality), Convert.ToString(xmlnode.Attributes["SoundQuality"].Value)); connectionInfo.Inheritance.SoundQuality = bool.Parse(xmlnode.Attributes["InheritSoundQuality"].Value); connectionInfo.RDPMinutesToIdleTimeout = Convert.ToInt32(xmlnode.Attributes["RDPMinutesToIdleTimeout"]?.Value ?? "0"); connectionInfo.Inheritance.RDPMinutesToIdleTimeout = bool.Parse(xmlnode.Attributes["InheritRDPMinutesToIdleTimeout"]?.Value ?? "False"); diff --git a/mRemoteV1/Config/Serializers/DataTableDeserializer.cs b/mRemoteV1/Config/Serializers/DataTableDeserializer.cs index d761a1ed..aa26cd6d 100644 --- a/mRemoteV1/Config/Serializers/DataTableDeserializer.cs +++ b/mRemoteV1/Config/Serializers/DataTableDeserializer.cs @@ -85,12 +85,12 @@ namespace mRemoteNG.Config.Serializers connectionInfo.UseCredSsp = (bool)dataRow["UseCredSsp"]; connectionInfo.RenderingEngine = (HTTPBase.RenderingEngine)Enum.Parse(typeof(HTTPBase.RenderingEngine), (string)dataRow["RenderingEngine"]); connectionInfo.ICAEncryptionStrength = (IcaProtocol.EncryptionStrength)Enum.Parse(typeof(IcaProtocol.EncryptionStrength), (string)dataRow["ICAEncryptionStrength"]); - connectionInfo.RDPAuthenticationLevel = (RdpProtocol.AuthenticationLevel)Enum.Parse(typeof(RdpProtocol.AuthenticationLevel), (string)dataRow["RDPAuthenticationLevel"]); + connectionInfo.RDPAuthenticationLevel = (RdpAuthenticationLevel)Enum.Parse(typeof(RdpAuthenticationLevel), (string)dataRow["RDPAuthenticationLevel"]); connectionInfo.RDPMinutesToIdleTimeout = (int)dataRow["RDPMinutesToIdleTimeout"]; connectionInfo.RDPAlertIdleTimeout = (bool)dataRow["RDPAlertIdleTimeout"]; connectionInfo.LoadBalanceInfo = (string)dataRow["LoadBalanceInfo"]; - connectionInfo.Colors = (RdpProtocol.RdpColors)Enum.Parse(typeof(RdpProtocol.RdpColors) ,(string)dataRow["Colors"]); - connectionInfo.Resolution = (RdpProtocol.RdpResolutions)Enum.Parse(typeof(RdpProtocol.RdpResolutions), (string)dataRow["Resolution"]); + connectionInfo.Colors = (RdpColors)Enum.Parse(typeof(RdpColors) ,(string)dataRow["Colors"]); + connectionInfo.Resolution = (RdpResolutions)Enum.Parse(typeof(RdpResolutions), (string)dataRow["Resolution"]); connectionInfo.AutomaticResize = (bool)dataRow["AutomaticResize"]; connectionInfo.DisplayWallpaper = (bool)dataRow["DisplayWallpaper"]; connectionInfo.DisplayThemes = (bool)dataRow["DisplayThemes"]; @@ -101,8 +101,8 @@ namespace mRemoteNG.Config.Serializers connectionInfo.RedirectPorts = (bool)dataRow["RedirectPorts"]; connectionInfo.RedirectPrinters = (bool)dataRow["RedirectPrinters"]; connectionInfo.RedirectSmartCards = (bool)dataRow["RedirectSmartCards"]; - connectionInfo.RedirectSound = (RdpProtocol.RdpSounds)Enum.Parse(typeof(RdpProtocol.RdpSounds), (string)dataRow["RedirectSound"]); - connectionInfo.SoundQuality = (RdpProtocol.RdpSoundQuality)Enum.Parse(typeof(RdpProtocol.RdpSoundQuality), (string)dataRow["SoundQuality"]); + connectionInfo.RedirectSound = (RdpSounds)Enum.Parse(typeof(RdpSounds), (string)dataRow["RedirectSound"]); + connectionInfo.SoundQuality = (RdpSoundQuality)Enum.Parse(typeof(RdpSoundQuality), (string)dataRow["SoundQuality"]); connectionInfo.RedirectKeys = (bool)dataRow["RedirectKeys"]; connectionInfo.PleaseConnect = (bool)dataRow["Connected"]; connectionInfo.PreExtApp = (string)dataRow["PreExtApp"]; @@ -121,9 +121,9 @@ namespace mRemoteNG.Config.Serializers connectionInfo.VNCColors = (ProtocolVNC.Colors)Enum.Parse(typeof(ProtocolVNC.Colors), (string)dataRow["VNCColors"]); connectionInfo.VNCSmartSizeMode = (ProtocolVNC.SmartSizeMode)Enum.Parse(typeof(ProtocolVNC.SmartSizeMode), (string)dataRow["VNCSmartSizeMode"]); connectionInfo.VNCViewOnly = (bool)dataRow["VNCViewOnly"]; - connectionInfo.RDGatewayUsageMethod = (RdpProtocol.RDGatewayUsageMethod)Enum.Parse(typeof(RdpProtocol.RDGatewayUsageMethod), (string)dataRow["RDGatewayUsageMethod"]); + connectionInfo.RDGatewayUsageMethod = (RDGatewayUsageMethod)Enum.Parse(typeof(RDGatewayUsageMethod), (string)dataRow["RDGatewayUsageMethod"]); connectionInfo.RDGatewayHostname = (string)dataRow["RDGatewayHostname"]; - connectionInfo.RDGatewayUseConnectionCredentials = (RdpProtocol.RDGatewayUseConnectionCredentials)Enum.Parse(typeof(RdpProtocol.RDGatewayUseConnectionCredentials), (string)dataRow["RDGatewayUseConnectionCredentials"]); + connectionInfo.RDGatewayUseConnectionCredentials = (RDGatewayUseConnectionCredentials)Enum.Parse(typeof(RDGatewayUseConnectionCredentials), (string)dataRow["RDGatewayUseConnectionCredentials"]); connectionInfo.RDGatewayUsername = (string)dataRow["RDGatewayUsername"]; connectionInfo.RDGatewayPassword = (string)dataRow["RDGatewayPassword"]; connectionInfo.RDGatewayDomain = (string)dataRow["RDGatewayDomain"]; diff --git a/mRemoteV1/Config/Serializers/MiscSerializers/CsvConnectionsDeserializerMremotengFormat.cs b/mRemoteV1/Config/Serializers/MiscSerializers/CsvConnectionsDeserializerMremotengFormat.cs index 2996b920..903e73b4 100644 --- a/mRemoteV1/Config/Serializers/MiscSerializers/CsvConnectionsDeserializerMremotengFormat.cs +++ b/mRemoteV1/Config/Serializers/MiscSerializers/CsvConnectionsDeserializerMremotengFormat.cs @@ -131,21 +131,21 @@ namespace mRemoteNG.Config.Serializers.MiscSerializers if (headers.Contains("RDPAuthenticationLevel")) { - RdpProtocol.AuthenticationLevel value; + RdpAuthenticationLevel value; if (Enum.TryParse(connectionCsv[headers.IndexOf("RDPAuthenticationLevel")], out value)) connectionRecord.RDPAuthenticationLevel = value; } if (headers.Contains("Colors")) { - RdpProtocol.RdpColors value; + RdpColors value; if (Enum.TryParse(connectionCsv[headers.IndexOf("Colors")], out value)) connectionRecord.Colors = value; } if (headers.Contains("Resolution")) { - RdpProtocol.RdpResolutions value; + RdpResolutions value; if (Enum.TryParse(connectionCsv[headers.IndexOf("Resolution")], out value)) connectionRecord.Resolution = value; } @@ -222,7 +222,7 @@ namespace mRemoteNG.Config.Serializers.MiscSerializers if (headers.Contains("RedirectSound")) { - RdpProtocol.RdpSounds value; + RdpSounds value; if (Enum.TryParse(connectionCsv[headers.IndexOf("RedirectSound")], out value)) connectionRecord.RedirectSound = value; } @@ -292,14 +292,14 @@ namespace mRemoteNG.Config.Serializers.MiscSerializers if (headers.Contains("RDGatewayUsageMethod")) { - RdpProtocol.RDGatewayUsageMethod value; + RDGatewayUsageMethod value; if (Enum.TryParse(connectionCsv[headers.IndexOf("RDGatewayUsageMethod")], out value)) connectionRecord.RDGatewayUsageMethod = value; } if (headers.Contains("RDGatewayUseConnectionCredentials")) { - RdpProtocol.RDGatewayUseConnectionCredentials value; + RDGatewayUseConnectionCredentials value; if (Enum.TryParse(connectionCsv[headers.IndexOf("RDGatewayUseConnectionCredentials")], out value)) connectionRecord.RDGatewayUseConnectionCredentials = value; } diff --git a/mRemoteV1/Config/Serializers/MiscSerializers/RemoteDesktopConnectionDeserializer.cs b/mRemoteV1/Config/Serializers/MiscSerializers/RemoteDesktopConnectionDeserializer.cs index 4d27dbff..5fc1775e 100644 --- a/mRemoteV1/Config/Serializers/MiscSerializers/RemoteDesktopConnectionDeserializer.cs +++ b/mRemoteV1/Config/Serializers/MiscSerializers/RemoteDesktopConnectionDeserializer.cs @@ -59,19 +59,19 @@ namespace mRemoteNG.Config.Serializers switch (value) { case "8": - connectionInfo.Colors = RdpProtocol.RdpColors.Colors256; + connectionInfo.Colors = RdpColors.Colors256; break; case "15": - connectionInfo.Colors = RdpProtocol.RdpColors.Colors15Bit; + connectionInfo.Colors = RdpColors.Colors15Bit; break; case "16": - connectionInfo.Colors = RdpProtocol.RdpColors.Colors16Bit; + connectionInfo.Colors = RdpColors.Colors16Bit; break; case "24": - connectionInfo.Colors = RdpProtocol.RdpColors.Colors24Bit; + connectionInfo.Colors = RdpColors.Colors24Bit; break; case "32": - connectionInfo.Colors = RdpProtocol.RdpColors.Colors32Bit; + connectionInfo.Colors = RdpColors.Colors32Bit; break; } break; @@ -79,7 +79,7 @@ namespace mRemoteNG.Config.Serializers connectionInfo.CacheBitmaps = value == "1"; break; case "screen mode id": - connectionInfo.Resolution = value == "2" ? RdpProtocol.RdpResolutions.Fullscreen : RdpProtocol.RdpResolutions.FitToWindow; + connectionInfo.Resolution = value == "2" ? RdpResolutions.Fullscreen : RdpResolutions.FitToWindow; break; case "connect to console": connectionInfo.UseConsoleSession = value == "1"; @@ -112,13 +112,13 @@ namespace mRemoteNG.Config.Serializers switch (value) { case "0": - connectionInfo.RedirectSound = RdpProtocol.RdpSounds.BringToThisComputer; + connectionInfo.RedirectSound = RdpSounds.BringToThisComputer; break; case "1": - connectionInfo.RedirectSound = RdpProtocol.RdpSounds.LeaveAtRemoteComputer; + connectionInfo.RedirectSound = RdpSounds.LeaveAtRemoteComputer; break; case "2": - connectionInfo.RedirectSound = RdpProtocol.RdpSounds.DoNotPlay; + connectionInfo.RedirectSound = RdpSounds.DoNotPlay; break; } break; diff --git a/mRemoteV1/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManagerDeserializer.cs b/mRemoteV1/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManagerDeserializer.cs index acb22d2e..eee483f2 100644 --- a/mRemoteV1/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManagerDeserializer.cs +++ b/mRemoteV1/Config/Serializers/MiscSerializers/RemoteDesktopConnectionManagerDeserializer.cs @@ -176,7 +176,7 @@ namespace mRemoteNG.Config.Serializers var gatewaySettingsNode = xmlNode.SelectSingleNode("./gatewaySettings"); if (gatewaySettingsNode?.Attributes?["inherit"].Value == "None") { - connectionInfo.RDGatewayUsageMethod = gatewaySettingsNode.SelectSingleNode("./enabled")?.InnerText == "True" ? RdpProtocol.RDGatewayUsageMethod.Always : RdpProtocol.RDGatewayUsageMethod.Never; + connectionInfo.RDGatewayUsageMethod = gatewaySettingsNode.SelectSingleNode("./enabled")?.InnerText == "True" ? RDGatewayUsageMethod.Always : RDGatewayUsageMethod.Never; connectionInfo.RDGatewayHostname = gatewaySettingsNode.SelectSingleNode("./hostName")?.InnerText; connectionInfo.RDGatewayUsername = gatewaySettingsNode.SelectSingleNode("./userName")?.InnerText; @@ -203,26 +203,26 @@ namespace mRemoteNG.Config.Serializers var resolutionString = remoteDesktopNode.SelectSingleNode("./size")?.InnerText.Replace(" ", ""); try { - connectionInfo.Resolution = (RdpProtocol.RdpResolutions)Enum.Parse(typeof(RdpProtocol.RdpResolutions), "Res" + resolutionString); + connectionInfo.Resolution = (RdpResolutions)Enum.Parse(typeof(RdpResolutions), "Res" + resolutionString); } catch (ArgumentException) { - connectionInfo.Resolution = RdpProtocol.RdpResolutions.FitToWindow; + connectionInfo.Resolution = RdpResolutions.FitToWindow; } if (remoteDesktopNode.SelectSingleNode("./sameSizeAsClientArea")?.InnerText == "True") { - connectionInfo.Resolution = RdpProtocol.RdpResolutions.FitToWindow; + connectionInfo.Resolution = RdpResolutions.FitToWindow; } if (remoteDesktopNode.SelectSingleNode("./fullScreen")?.InnerText == "True") { - connectionInfo.Resolution = RdpProtocol.RdpResolutions.Fullscreen; + connectionInfo.Resolution = RdpResolutions.Fullscreen; } var colorDepth = remoteDesktopNode.SelectSingleNode("./colorDepth")?.InnerText; if (colorDepth != null) - connectionInfo.Colors = (RdpProtocol.RdpColors)Enum.Parse(typeof(RdpProtocol.RdpColors), colorDepth); + connectionInfo.Colors = (RdpColors)Enum.Parse(typeof(RdpColors), colorDepth); } else { @@ -238,15 +238,15 @@ namespace mRemoteNG.Config.Serializers { case "0": // Bring to this computer case "Client": - connectionInfo.RedirectSound = RdpProtocol.RdpSounds.BringToThisComputer; + connectionInfo.RedirectSound = RdpSounds.BringToThisComputer; break; case "1": // Leave at remote computer case "Remote": - connectionInfo.RedirectSound = RdpProtocol.RdpSounds.LeaveAtRemoteComputer; + connectionInfo.RedirectSound = RdpSounds.LeaveAtRemoteComputer; break; case "2": // Do not play case "NoSound": - connectionInfo.RedirectSound = RdpProtocol.RdpSounds.DoNotPlay; + connectionInfo.RedirectSound = RdpSounds.DoNotPlay; break; } @@ -294,15 +294,15 @@ namespace mRemoteNG.Config.Serializers { case "0": // No authentication case "None": - connectionInfo.RDPAuthenticationLevel = RdpProtocol.AuthenticationLevel.NoAuth; + connectionInfo.RDPAuthenticationLevel = RdpAuthenticationLevel.NoAuth; break; case "1": // Do not connect if authentication fails case "Required": - connectionInfo.RDPAuthenticationLevel = RdpProtocol.AuthenticationLevel.AuthRequired; + connectionInfo.RDPAuthenticationLevel = RdpAuthenticationLevel.AuthRequired; break; case "2": // Warn if authentication fails case "Warn": - connectionInfo.RDPAuthenticationLevel = RdpProtocol.AuthenticationLevel.WarnOnFailedAuth; + connectionInfo.RDPAuthenticationLevel = RdpAuthenticationLevel.WarnOnFailedAuth; break; } } diff --git a/mRemoteV1/Connection/AbstractConnectionRecord.cs b/mRemoteV1/Connection/AbstractConnectionRecord.cs index d4cf7af7..51eaf33b 100644 --- a/mRemoteV1/Connection/AbstractConnectionRecord.cs +++ b/mRemoteV1/Connection/AbstractConnectionRecord.cs @@ -31,23 +31,23 @@ namespace mRemoteNG.Connection private string _puttySession; private IcaProtocol.EncryptionStrength _icaEncryption; private bool _useConsoleSession; - private RdpProtocol.AuthenticationLevel _rdpAuthenticationLevel; + private RdpAuthenticationLevel _rdpAuthenticationLevel; private int _rdpMinutesToIdleTimeout; private bool _rdpAlertIdleTimeout; private string _loadBalanceInfo; private HTTPBase.RenderingEngine _renderingEngine; private bool _useCredSsp; - private RdpProtocol.RDGatewayUsageMethod _rdGatewayUsageMethod; + private RDGatewayUsageMethod _rdGatewayUsageMethod; private string _rdGatewayHostname; - private RdpProtocol.RDGatewayUseConnectionCredentials _rdGatewayUseConnectionCredentials; + private RDGatewayUseConnectionCredentials _rdGatewayUseConnectionCredentials; private string _rdGatewayUsername; private string _rdGatewayPassword; private string _rdGatewayDomain; - private RdpProtocol.RdpResolutions _resolution; + private RdpResolutions _resolution; private bool _automaticResize; - private RdpProtocol.RdpColors _colors; + private RdpColors _colors; private bool _cacheBitmaps; private bool _displayWallpaper; private bool _displayThemes; @@ -59,8 +59,8 @@ namespace mRemoteNG.Connection private bool _redirectPrinters; private bool _redirectPorts; private bool _redirectSmartCards; - private RdpProtocol.RdpSounds _redirectSound; - private RdpProtocol.RdpSoundQuality _soundQuality; + private RdpSounds _redirectSound; + private RdpSoundQuality _soundQuality; private string _preExtApp; private string _postExtApp; @@ -223,7 +223,7 @@ namespace mRemoteNG.Connection LocalizedAttributes.LocalizedDisplayName("strPropertyNameAuthenticationLevel"), LocalizedAttributes.LocalizedDescription("strPropertyDescriptionAuthenticationLevel"), TypeConverter(typeof(MiscTools.EnumTypeConverter))] - public RdpProtocol.AuthenticationLevel RDPAuthenticationLevel + public RdpAuthenticationLevel RDPAuthenticationLevel { get { return GetPropertyValue("RDPAuthenticationLevel", _rdpAuthenticationLevel); } set { SetField(ref _rdpAuthenticationLevel, value, "RDPAuthenticationLevel"); } @@ -288,7 +288,7 @@ namespace mRemoteNG.Connection LocalizedAttributes.LocalizedDisplayName("strPropertyNameRDGatewayUsageMethod"), LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRDGatewayUsageMethod"), TypeConverter(typeof(MiscTools.EnumTypeConverter))] - public RdpProtocol.RDGatewayUsageMethod RDGatewayUsageMethod + public RDGatewayUsageMethod RDGatewayUsageMethod { get { return GetPropertyValue("RDGatewayUsageMethod", _rdGatewayUsageMethod); } set { SetField(ref _rdGatewayUsageMethod, value, "RDGatewayUsageMethod"); } @@ -307,7 +307,7 @@ namespace mRemoteNG.Connection LocalizedAttributes.LocalizedDisplayName("strPropertyNameRDGatewayUseConnectionCredentials"), LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRDGatewayUseConnectionCredentials"), TypeConverter(typeof(MiscTools.EnumTypeConverter))] - public RdpProtocol.RDGatewayUseConnectionCredentials RDGatewayUseConnectionCredentials + public RDGatewayUseConnectionCredentials RDGatewayUseConnectionCredentials { get { return GetPropertyValue("RDGatewayUseConnectionCredentials", _rdGatewayUseConnectionCredentials); } set { SetField(ref _rdGatewayUseConnectionCredentials, value, "RDGatewayUseConnectionCredentials"); } @@ -347,7 +347,7 @@ namespace mRemoteNG.Connection LocalizedAttributes.LocalizedDisplayName("strPropertyNameResolution"), LocalizedAttributes.LocalizedDescription("strPropertyDescriptionResolution"), TypeConverter(typeof(MiscTools.EnumTypeConverter))] - public RdpProtocol.RdpResolutions Resolution + public RdpResolutions Resolution { get { return GetPropertyValue("Resolution", _resolution); } set { SetField(ref _resolution, value, "Resolution"); } @@ -367,7 +367,7 @@ namespace mRemoteNG.Connection LocalizedAttributes.LocalizedDisplayName("strPropertyNameColors"), LocalizedAttributes.LocalizedDescription("strPropertyDescriptionColors"), TypeConverter(typeof(MiscTools.EnumTypeConverter))] - public RdpProtocol.RdpColors Colors + public RdpColors Colors { get { return GetPropertyValue("Colors", _colors); } set { SetField(ref _colors, value, "Colors"); } @@ -479,7 +479,7 @@ namespace mRemoteNG.Connection LocalizedAttributes.LocalizedDisplayName("strPropertyNameRedirectSounds"), LocalizedAttributes.LocalizedDescription("strPropertyDescriptionRedirectSounds"), TypeConverter(typeof(MiscTools.EnumTypeConverter))] - public RdpProtocol.RdpSounds RedirectSound + public RdpSounds RedirectSound { get { return GetPropertyValue("RedirectSound", _redirectSound); } set { SetField(ref _redirectSound, value, "RedirectSound"); } @@ -489,7 +489,7 @@ namespace mRemoteNG.Connection LocalizedAttributes.LocalizedDisplayName("strPropertyNameSoundQuality"), LocalizedAttributes.LocalizedDescription("strPropertyDescriptionSoundQuality"), TypeConverter(typeof(MiscTools.EnumTypeConverter))] - public RdpProtocol.RdpSoundQuality SoundQuality + public RdpSoundQuality SoundQuality { get { return GetPropertyValue("SoundQuality", _soundQuality); } set { SetField(ref _soundQuality, value, "SoundQuality"); } diff --git a/mRemoteV1/Connection/ConnectionInfo.cs b/mRemoteV1/Connection/ConnectionInfo.cs index b662ab1f..ee4d8cfa 100644 --- a/mRemoteV1/Connection/ConnectionInfo.cs +++ b/mRemoteV1/Connection/ConnectionInfo.cs @@ -274,7 +274,7 @@ namespace mRemoteNG.Connection PuttySession = Settings.Default.ConDefaultPuttySession; ICAEncryptionStrength = (IcaProtocol.EncryptionStrength) Enum.Parse(typeof(IcaProtocol.EncryptionStrength), Settings.Default.ConDefaultICAEncryptionStrength); UseConsoleSession = Settings.Default.ConDefaultUseConsoleSession; - RDPAuthenticationLevel = (RdpProtocol.AuthenticationLevel) Enum.Parse(typeof(RdpProtocol.AuthenticationLevel), Settings.Default.ConDefaultRDPAuthenticationLevel); + RDPAuthenticationLevel = (RdpAuthenticationLevel) Enum.Parse(typeof(RdpAuthenticationLevel), Settings.Default.ConDefaultRDPAuthenticationLevel); RDPMinutesToIdleTimeout = Settings.Default.ConDefaultRDPMinutesToIdleTimeout; RDPAlertIdleTimeout = Settings.Default.ConDefaultRDPAlertIdleTimeout; LoadBalanceInfo = Settings.Default.ConDefaultLoadBalanceInfo; @@ -284,9 +284,9 @@ namespace mRemoteNG.Connection private void SetRdGatewayDefaults() { - RDGatewayUsageMethod = (RdpProtocol.RDGatewayUsageMethod) Enum.Parse(typeof(RdpProtocol.RDGatewayUsageMethod), Settings.Default.ConDefaultRDGatewayUsageMethod); + RDGatewayUsageMethod = (RDGatewayUsageMethod) Enum.Parse(typeof(RDGatewayUsageMethod), Settings.Default.ConDefaultRDGatewayUsageMethod); RDGatewayHostname = Settings.Default.ConDefaultRDGatewayHostname; - RDGatewayUseConnectionCredentials = (RdpProtocol.RDGatewayUseConnectionCredentials) Enum.Parse(typeof(RdpProtocol.RDGatewayUseConnectionCredentials), Settings.Default.ConDefaultRDGatewayUseConnectionCredentials); + RDGatewayUseConnectionCredentials = (RDGatewayUseConnectionCredentials) Enum.Parse(typeof(RDGatewayUseConnectionCredentials), Settings.Default.ConDefaultRDGatewayUseConnectionCredentials); RDGatewayUsername = Settings.Default.ConDefaultRDGatewayUsername; RDGatewayPassword = Settings.Default.ConDefaultRDGatewayPassword; RDGatewayDomain = Settings.Default.ConDefaultRDGatewayDomain; @@ -294,9 +294,9 @@ namespace mRemoteNG.Connection private void SetAppearanceDefaults() { - Resolution = (RdpProtocol.RdpResolutions) Enum.Parse(typeof(RdpProtocol.RdpResolutions), Settings.Default.ConDefaultResolution); + Resolution = (RdpResolutions) Enum.Parse(typeof(RdpResolutions), Settings.Default.ConDefaultResolution); AutomaticResize = Settings.Default.ConDefaultAutomaticResize; - Colors = (RdpProtocol.RdpColors) Enum.Parse(typeof(RdpProtocol.RdpColors), Settings.Default.ConDefaultColors); + Colors = (RdpColors) Enum.Parse(typeof(RdpColors), Settings.Default.ConDefaultColors); CacheBitmaps = Settings.Default.ConDefaultCacheBitmaps; DisplayWallpaper = Settings.Default.ConDefaultDisplayWallpaper; DisplayThemes = Settings.Default.ConDefaultDisplayThemes; @@ -311,8 +311,8 @@ namespace mRemoteNG.Connection RedirectPrinters = Settings.Default.ConDefaultRedirectPrinters; RedirectPorts = Settings.Default.ConDefaultRedirectPorts; RedirectSmartCards = Settings.Default.ConDefaultRedirectSmartCards; - RedirectSound = (RdpProtocol.RdpSounds) Enum.Parse(typeof(RdpProtocol.RdpSounds), Settings.Default.ConDefaultRedirectSound); - SoundQuality = (RdpProtocol.RdpSoundQuality)Enum.Parse(typeof(RdpProtocol.RdpSoundQuality), Settings.Default.ConDefaultSoundQuality); + RedirectSound = (RdpSounds) Enum.Parse(typeof(RdpSounds), Settings.Default.ConDefaultRedirectSound); + SoundQuality = (RdpSoundQuality)Enum.Parse(typeof(RdpSoundQuality), Settings.Default.ConDefaultSoundQuality); } private void SetMiscDefaults() diff --git a/mRemoteV1/Connection/Protocol/ICA/IcaProtocol.cs b/mRemoteV1/Connection/Protocol/ICA/IcaProtocol.cs index 27b9414b..8f6a5634 100644 --- a/mRemoteV1/Connection/Protocol/ICA/IcaProtocol.cs +++ b/mRemoteV1/Connection/Protocol/ICA/IcaProtocol.cs @@ -187,15 +187,15 @@ namespace mRemoteNG.Connection.Protocol.ICA return; } - if (InterfaceControl.Info.Resolution == RdpProtocol.RdpResolutions.FitToWindow) + if (InterfaceControl.Info.Resolution == RdpResolutions.FitToWindow) { _icaClient.SetWindowSize(WFICALib.ICAWindowType.WindowTypeClient, InterfaceControl.Size.Width, InterfaceControl.Size.Height, 0); } - else if (InterfaceControl.Info.Resolution == RdpProtocol.RdpResolutions.SmartSize) + else if (InterfaceControl.Info.Resolution == RdpResolutions.SmartSize) { _icaClient.SetWindowSize(WFICALib.ICAWindowType.WindowTypeClient, InterfaceControl.Size.Width, InterfaceControl.Size.Height, 0); } - else if (InterfaceControl.Info.Resolution == RdpProtocol.RdpResolutions.Fullscreen) + else if (InterfaceControl.Info.Resolution == RdpResolutions.Fullscreen) { _icaClient.SetWindowSize(WFICALib.ICAWindowType.WindowTypeClient, Screen.FromControl(_frmMain).Bounds.Width, Screen.FromControl(_frmMain).Bounds.Height, 0); _icaClient.FullScreenWindow(); @@ -217,13 +217,13 @@ namespace mRemoteNG.Connection.Protocol.ICA // ReSharper disable once SwitchStatementMissingSomeCases switch (_info.Colors) { - case RdpProtocol.RdpColors.Colors256: + case RdpColors.Colors256: _icaClient.SetProp("DesiredColor", "2"); break; - case RdpProtocol.RdpColors.Colors15Bit: + case RdpColors.Colors15Bit: _icaClient.SetProp("DesiredColor", "4"); break; - case RdpProtocol.RdpColors.Colors16Bit: + case RdpColors.Colors16Bit: _icaClient.SetProp("DesiredColor", "4"); break; default: diff --git a/mRemoteV1/Connection/Protocol/RDP/Enums/AuthenticationLevel.cs b/mRemoteV1/Connection/Protocol/RDP/Enums/AuthenticationLevel.cs deleted file mode 100644 index f21cb05e..00000000 --- a/mRemoteV1/Connection/Protocol/RDP/Enums/AuthenticationLevel.cs +++ /dev/null @@ -1,17 +0,0 @@ -using mRemoteNG.Tools; - -namespace mRemoteNG.Connection.Protocol.RDP -{ - public partial class RdpProtocol - { - public enum AuthenticationLevel - { - [LocalizedAttributes.LocalizedDescription("strAlwaysConnectEvenIfAuthFails")] - NoAuth = 0, - [LocalizedAttributes.LocalizedDescription("strDontConnectWhenAuthFails")] - AuthRequired = 1, - [LocalizedAttributes.LocalizedDescription("strWarnIfAuthFails")] - WarnOnFailedAuth = 2 - } - } -} diff --git a/mRemoteV1/Connection/Protocol/RDP/Enums/RDGatewayUsageMethod.cs b/mRemoteV1/Connection/Protocol/RDP/Enums/RDGatewayUsageMethod.cs index ad614795..76c70fac 100644 --- a/mRemoteV1/Connection/Protocol/RDP/Enums/RDGatewayUsageMethod.cs +++ b/mRemoteV1/Connection/Protocol/RDP/Enums/RDGatewayUsageMethod.cs @@ -2,16 +2,13 @@ namespace mRemoteNG.Connection.Protocol.RDP { - public partial class RdpProtocol + public enum RDGatewayUsageMethod { - public enum RDGatewayUsageMethod - { - [LocalizedAttributes.LocalizedDescription("strNever")] - Never = 0, // TSC_PROXY_MODE_NONE_DIRECT - [LocalizedAttributes.LocalizedDescription("strAlways")] - Always = 1, // TSC_PROXY_MODE_DIRECT - [LocalizedAttributes.LocalizedDescription("strDetect")] - Detect = 2 // TSC_PROXY_MODE_DETECT - } + [LocalizedAttributes.LocalizedDescription("strNever")] + Never = 0, // TSC_PROXY_MODE_NONE_DIRECT + [LocalizedAttributes.LocalizedDescription("strAlways")] + Always = 1, // TSC_PROXY_MODE_DIRECT + [LocalizedAttributes.LocalizedDescription("strDetect")] + Detect = 2 // TSC_PROXY_MODE_DETECT } } diff --git a/mRemoteV1/Connection/Protocol/RDP/Enums/RDGatewayUseConnectionCredentials.cs b/mRemoteV1/Connection/Protocol/RDP/Enums/RDGatewayUseConnectionCredentials.cs index dfa0ef5c..190d0025 100644 --- a/mRemoteV1/Connection/Protocol/RDP/Enums/RDGatewayUseConnectionCredentials.cs +++ b/mRemoteV1/Connection/Protocol/RDP/Enums/RDGatewayUseConnectionCredentials.cs @@ -2,16 +2,13 @@ namespace mRemoteNG.Connection.Protocol.RDP { - public partial class RdpProtocol + public enum RDGatewayUseConnectionCredentials { - public enum RDGatewayUseConnectionCredentials - { - [LocalizedAttributes.LocalizedDescription("strUseDifferentUsernameAndPassword")] - No = 0, - [LocalizedAttributes.LocalizedDescription("strUseSameUsernameAndPassword")] - Yes = 1, - [LocalizedAttributes.LocalizedDescription("strUseSmartCard")] - SmartCard = 2 - } + [LocalizedAttributes.LocalizedDescription("strUseDifferentUsernameAndPassword")] + No = 0, + [LocalizedAttributes.LocalizedDescription("strUseSameUsernameAndPassword")] + Yes = 1, + [LocalizedAttributes.LocalizedDescription("strUseSmartCard")] + SmartCard = 2 } } diff --git a/mRemoteV1/Connection/Protocol/RDP/Enums/RDPPerformanceFlags.cs b/mRemoteV1/Connection/Protocol/RDP/Enums/RDPPerformanceFlags.cs index a266c46b..cbe9f8b3 100644 --- a/mRemoteV1/Connection/Protocol/RDP/Enums/RDPPerformanceFlags.cs +++ b/mRemoteV1/Connection/Protocol/RDP/Enums/RDPPerformanceFlags.cs @@ -2,18 +2,15 @@ namespace mRemoteNG.Connection.Protocol.RDP { - public partial class RdpProtocol + public enum RdpPerformanceFlags { - private enum RdpPerformanceFlags - { - [Description("strRDPDisableWallpaper")]DisableWallpaper = 0x1, + [Description("strRDPDisableWallpaper")]DisableWallpaper = 0x1, // [Description("strRDPDisableFullWindowdrag")]DisableFullWindowDrag = 0x2, // [Description("strRDPDisableMenuAnimations")]DisableMenuAnimations = 0x4, - [Description("strRDPDisableThemes")]DisableThemes = 0x8, + [Description("strRDPDisableThemes")]DisableThemes = 0x8, // [Description("strRDPDisableCursorShadow")]DisableCursorShadow = 0x20, // [Description("strRDPDisableCursorblinking")]DisableCursorBlinking = 0x40, - [Description("strRDPEnableFontSmoothing")]EnableFontSmoothing = 0x80, - [Description("strRDPEnableDesktopComposition")]EnableDesktopComposition = 0x100 - } + [Description("strRDPEnableFontSmoothing")]EnableFontSmoothing = 0x80, + [Description("strRDPEnableDesktopComposition")]EnableDesktopComposition = 0x100 } } diff --git a/mRemoteV1/Connection/Protocol/RDP/Enums/RDPResolutions.cs b/mRemoteV1/Connection/Protocol/RDP/Enums/RDPResolutions.cs index 17eeb6fe..6195baba 100644 --- a/mRemoteV1/Connection/Protocol/RDP/Enums/RDPResolutions.cs +++ b/mRemoteV1/Connection/Protocol/RDP/Enums/RDPResolutions.cs @@ -3,50 +3,47 @@ using mRemoteNG.Tools; namespace mRemoteNG.Connection.Protocol.RDP { - public partial class RdpProtocol - { - public enum RdpResolutions - { - [LocalizedAttributes.LocalizedDescription("strRDPFitToPanel")] - FitToWindow, - [LocalizedAttributes.LocalizedDescription("strFullscreen")] - Fullscreen, - [LocalizedAttributes.LocalizedDescription("strRDPSmartSize")] - SmartSize, - [Description("800x600")] - Res800x600, - [Description("1024x768")] - Res1024x768, - [Description("1152x864")] - Res1152x864, - [Description("1280x800")] - Res1280x800, - [Description("1280x1024")] - Res1280x1024, - [Description("1366x768")] - Res1366x768, - [Description("1440x900")] - Res1440x900, - [Description("1600x900")] - Res1600x900, - [Description("1600x1200")] - Res1600x1200, - [Description("1680x1050")] - Res1680x1050, - [Description("1920x1080")] - Res1920x1080, - [Description("1920x1200")] - Res1920x1200, - [Description("2048x1536")] - Res2048x1536, - [Description("2560x1440")] - Res2560x1440, - [Description("2560x1600")] - Res2560x1600, - [Description("2560x2048")] - Res2560x2048, - [Description("3840x2160")] - Res3840x2160 - } - } + public enum RdpResolutions + { + [LocalizedAttributes.LocalizedDescription("strRDPFitToPanel")] + FitToWindow, + [LocalizedAttributes.LocalizedDescription("strFullscreen")] + Fullscreen, + [LocalizedAttributes.LocalizedDescription("strRDPSmartSize")] + SmartSize, + [Description("800x600")] + Res800x600, + [Description("1024x768")] + Res1024x768, + [Description("1152x864")] + Res1152x864, + [Description("1280x800")] + Res1280x800, + [Description("1280x1024")] + Res1280x1024, + [Description("1366x768")] + Res1366x768, + [Description("1440x900")] + Res1440x900, + [Description("1600x900")] + Res1600x900, + [Description("1600x1200")] + Res1600x1200, + [Description("1680x1050")] + Res1680x1050, + [Description("1920x1080")] + Res1920x1080, + [Description("1920x1200")] + Res1920x1200, + [Description("2048x1536")] + Res2048x1536, + [Description("2560x1440")] + Res2560x1440, + [Description("2560x1600")] + Res2560x1600, + [Description("2560x2048")] + Res2560x2048, + [Description("3840x2160")] + Res3840x2160 + } } diff --git a/mRemoteV1/Connection/Protocol/RDP/Enums/RDPSoundQuality.cs b/mRemoteV1/Connection/Protocol/RDP/Enums/RDPSoundQuality.cs index b664061b..b464fd7f 100644 --- a/mRemoteV1/Connection/Protocol/RDP/Enums/RDPSoundQuality.cs +++ b/mRemoteV1/Connection/Protocol/RDP/Enums/RDPSoundQuality.cs @@ -2,16 +2,13 @@ namespace mRemoteNG.Connection.Protocol.RDP { - public partial class RdpProtocol + public enum RdpSoundQuality { - public enum RdpSoundQuality - { - [LocalizedAttributes.LocalizedDescription("strRDPSoundQualityDynamic")] - Dynamic = 0, - [LocalizedAttributes.LocalizedDescription("strRDPSoundQualityMedium")] - Medium = 1, - [LocalizedAttributes.LocalizedDescription("strRDPSoundQualityHigh")] - High = 2 - } - } + [LocalizedAttributes.LocalizedDescription("strRDPSoundQualityDynamic")] + Dynamic = 0, + [LocalizedAttributes.LocalizedDescription("strRDPSoundQualityMedium")] + Medium = 1, + [LocalizedAttributes.LocalizedDescription("strRDPSoundQualityHigh")] + High = 2 + } } diff --git a/mRemoteV1/Connection/Protocol/RDP/Enums/RDPSounds.cs b/mRemoteV1/Connection/Protocol/RDP/Enums/RDPSounds.cs index 6d725494..c64f8a20 100644 --- a/mRemoteV1/Connection/Protocol/RDP/Enums/RDPSounds.cs +++ b/mRemoteV1/Connection/Protocol/RDP/Enums/RDPSounds.cs @@ -2,16 +2,13 @@ namespace mRemoteNG.Connection.Protocol.RDP { - public partial class RdpProtocol + public enum RdpSounds { - public enum RdpSounds - { - [LocalizedAttributes.LocalizedDescription("strRDPSoundBringToThisComputer")] - BringToThisComputer = 0, - [LocalizedAttributes.LocalizedDescription("strRDPSoundLeaveAtRemoteComputer")] - LeaveAtRemoteComputer = 1, - [LocalizedAttributes.LocalizedDescription("strRDPSoundDoNotPlay")] - DoNotPlay = 2 - } + [LocalizedAttributes.LocalizedDescription("strRDPSoundBringToThisComputer")] + BringToThisComputer = 0, + [LocalizedAttributes.LocalizedDescription("strRDPSoundLeaveAtRemoteComputer")] + LeaveAtRemoteComputer = 1, + [LocalizedAttributes.LocalizedDescription("strRDPSoundDoNotPlay")] + DoNotPlay = 2 } } diff --git a/mRemoteV1/Connection/Protocol/RDP/Enums/RdpAuthenticationLevel.cs b/mRemoteV1/Connection/Protocol/RDP/Enums/RdpAuthenticationLevel.cs new file mode 100644 index 00000000..e6bef3d2 --- /dev/null +++ b/mRemoteV1/Connection/Protocol/RDP/Enums/RdpAuthenticationLevel.cs @@ -0,0 +1,14 @@ +using mRemoteNG.Tools; + +namespace mRemoteNG.Connection.Protocol.RDP +{ + public enum RdpAuthenticationLevel + { + [LocalizedAttributes.LocalizedDescription("strAlwaysConnectEvenIfAuthFails")] + NoAuth = 0, + [LocalizedAttributes.LocalizedDescription("strDontConnectWhenAuthFails")] + AuthRequired = 1, + [LocalizedAttributes.LocalizedDescription("strWarnIfAuthFails")] + WarnOnFailedAuth = 2 + } +} diff --git a/mRemoteV1/Connection/Protocol/RDP/Enums/RdpColors.cs b/mRemoteV1/Connection/Protocol/RDP/Enums/RdpColors.cs index a679cb38..07ac81f6 100644 --- a/mRemoteV1/Connection/Protocol/RDP/Enums/RdpColors.cs +++ b/mRemoteV1/Connection/Protocol/RDP/Enums/RdpColors.cs @@ -2,20 +2,17 @@ namespace mRemoteNG.Connection.Protocol.RDP { - public partial class RdpProtocol + public enum RdpColors { - public enum RdpColors - { - [LocalizedAttributes.LocalizedDescription("strRDP256Colors")] - Colors256 = 8, - [LocalizedAttributes.LocalizedDescription("strRDP32768Colors")] - Colors15Bit = 15, - [LocalizedAttributes.LocalizedDescription("strRDP65536Colors")] - Colors16Bit = 16, - [LocalizedAttributes.LocalizedDescription("strRDP16777216Colors")] - Colors24Bit = 24, - [LocalizedAttributes.LocalizedDescription("strRDP4294967296Colors")] - Colors32Bit = 32 - } + [LocalizedAttributes.LocalizedDescription("strRDP256Colors")] + Colors256 = 8, + [LocalizedAttributes.LocalizedDescription("strRDP32768Colors")] + Colors15Bit = 15, + [LocalizedAttributes.LocalizedDescription("strRDP65536Colors")] + Colors16Bit = 16, + [LocalizedAttributes.LocalizedDescription("strRDP16777216Colors")] + Colors24Bit = 24, + [LocalizedAttributes.LocalizedDescription("strRDP4294967296Colors")] + Colors32Bit = 32 } } diff --git a/mRemoteV1/UI/Window/ConfigWindow.cs b/mRemoteV1/UI/Window/ConfigWindow.cs index ff548510..b7aaae45 100644 --- a/mRemoteV1/UI/Window/ConfigWindow.cs +++ b/mRemoteV1/UI/Window/ConfigWindow.cs @@ -878,7 +878,7 @@ namespace mRemoteNG.UI.Window { strHide.Add("RDPAlertIdleTimeout"); } - if (conI.RDGatewayUsageMethod == RdpProtocol.RDGatewayUsageMethod.Never) + if (conI.RDGatewayUsageMethod == RDGatewayUsageMethod.Never) { strHide.Add("RDGatewayDomain"); strHide.Add("RDGatewayHostname"); @@ -886,17 +886,17 @@ namespace mRemoteNG.UI.Window strHide.Add("RDGatewayUseConnectionCredentials"); strHide.Add("RDGatewayUsername"); } - else if (conI.RDGatewayUseConnectionCredentials == RdpProtocol.RDGatewayUseConnectionCredentials.Yes) + else if (conI.RDGatewayUseConnectionCredentials == RDGatewayUseConnectionCredentials.Yes) { strHide.Add("RDGatewayDomain"); strHide.Add("RDGatewayPassword"); strHide.Add("RDGatewayUsername"); } - if (!(conI.Resolution == RdpProtocol.RdpResolutions.FitToWindow || conI.Resolution == RdpProtocol.RdpResolutions.Fullscreen)) + if (!(conI.Resolution == RdpResolutions.FitToWindow || conI.Resolution == RdpResolutions.Fullscreen)) { strHide.Add("AutomaticResize"); } - if (conI.RedirectSound != RdpProtocol.RdpSounds.BringToThisComputer) + if (conI.RedirectSound != RdpSounds.BringToThisComputer) { strHide.Add("SoundQuality"); } diff --git a/mRemoteV1/mRemoteV1.csproj b/mRemoteV1/mRemoteV1.csproj index 90b21c78..8b639679 100644 --- a/mRemoteV1/mRemoteV1.csproj +++ b/mRemoteV1/mRemoteV1.csproj @@ -236,15 +236,15 @@ - + - - + +