diff --git a/src/RoyalApps.Community.Rdp.WinForms/Controls/RdpClient.cs b/src/RoyalApps.Community.Rdp.WinForms/Controls/RdpClient.cs index 5e477c3..8383abd 100644 --- a/src/RoyalApps.Community.Rdp.WinForms/Controls/RdpClient.cs +++ b/src/RoyalApps.Community.Rdp.WinForms/Controls/RdpClient.cs @@ -780,6 +780,23 @@ public bool NegotiateSecurityLayer set => LogFeatureNotSupported(nameof(NegotiateSecurityLayer)); } + /// + public bool ShowConnectionInformation + { + get + { + if (!this.TryGetProperty(RdpClientExtensions.ShowConnectionInformation, out var value, out var ex)) + Logger.LogWarning(ex, "Failed to get RDP client property: {PropertyName}", RdpClientExtensions.ShowConnectionInformation); + return value; + } + set + { + object showConnectionInformation = value; + if (!this.TrySetProperty(RdpClientExtensions.ShowConnectionInformation, ref showConnectionInformation, out var ex)) + Logger.LogWarning(ex, "Failed to set RDP client property: {PropertyName} to {PropertyValue}", RdpClientExtensions.ShowConnectionInformation, showConnectionInformation); + } + } + #endregion #region ::: Misc ::: @@ -1564,6 +1581,23 @@ public bool NegotiateSecurityLayer } } + /// + public bool ShowConnectionInformation + { + get + { + if (!this.TryGetProperty(RdpClientExtensions.ShowConnectionInformation, out var value, out var ex)) + Logger.LogWarning(ex, "Failed to get RDP client property: {PropertyName}", RdpClientExtensions.ShowConnectionInformation); + return value; + } + set + { + object showConnectionInformation = value; + if (!this.TrySetProperty(RdpClientExtensions.ShowConnectionInformation, ref showConnectionInformation, out var ex)) + Logger.LogWarning(ex, "Failed to set RDP client property: {PropertyName} to {PropertyValue}", RdpClientExtensions.ShowConnectionInformation, showConnectionInformation); + } + } + #endregion #region ::: Misc ::: @@ -2330,6 +2364,23 @@ public bool NegotiateSecurityLayer } } + /// + public bool ShowConnectionInformation + { + get + { + if (!this.TryGetProperty(RdpClientExtensions.ShowConnectionInformation, out var value, out var ex)) + Logger.LogWarning(ex, "Failed to get RDP client property: {PropertyName}", RdpClientExtensions.ShowConnectionInformation); + return value; + } + set + { + object showConnectionInformation = value; + if (!this.TrySetProperty(RdpClientExtensions.ShowConnectionInformation, ref showConnectionInformation, out var ex)) + Logger.LogWarning(ex, "Failed to set RDP client property: {PropertyName} to {PropertyValue}", RdpClientExtensions.ShowConnectionInformation, showConnectionInformation); + } + } + #endregion #region ::: Misc ::: @@ -3158,6 +3209,23 @@ public bool NegotiateSecurityLayer } } + /// + public bool ShowConnectionInformation + { + get + { + if (!this.TryGetProperty(RdpClientExtensions.ShowConnectionInformation, out var value, out var ex)) + Logger.LogWarning(ex, "Failed to get RDP client property: {PropertyName}", RdpClientExtensions.ShowConnectionInformation); + return value; + } + set + { + object showConnectionInformation = value; + if (!this.TrySetProperty(RdpClientExtensions.ShowConnectionInformation, ref showConnectionInformation, out var ex)) + Logger.LogWarning(ex, "Failed to set RDP client property: {PropertyName} to {PropertyValue}", RdpClientExtensions.ShowConnectionInformation, showConnectionInformation); + } + } + #endregion #region ::: Misc ::: @@ -3932,6 +4000,23 @@ public bool NegotiateSecurityLayer } } + /// + public bool ShowConnectionInformation + { + get + { + if (!this.TryGetProperty(RdpClientExtensions.ShowConnectionInformation, out var value, out var ex)) + Logger.LogWarning(ex, "Failed to get RDP client property: {PropertyName}", RdpClientExtensions.ShowConnectionInformation); + return value; + } + set + { + object showConnectionInformation = value; + if (!this.TrySetProperty(RdpClientExtensions.ShowConnectionInformation, ref showConnectionInformation, out var ex)) + Logger.LogWarning(ex, "Failed to set RDP client property: {PropertyName} to {PropertyValue}", RdpClientExtensions.ShowConnectionInformation, showConnectionInformation); + } + } + #endregion #region ::: Misc ::: diff --git a/src/RoyalApps.Community.Rdp.WinForms/Controls/RdpClientExtensions.cs b/src/RoyalApps.Community.Rdp.WinForms/Controls/RdpClientExtensions.cs index 8c49c4c..361b800 100644 --- a/src/RoyalApps.Community.Rdp.WinForms/Controls/RdpClientExtensions.cs +++ b/src/RoyalApps.Community.Rdp.WinForms/Controls/RdpClientExtensions.cs @@ -18,13 +18,14 @@ internal static class RdpClientExtensions public static readonly string DisableCredentialsDelegation = "DisableCredentialsDelegation"; public static readonly string DisableUdpTransport = "DisableUDPTransport"; public static readonly string EnableMouseJiggler = "EnableMouseJiggler"; - public static readonly string MouseJigglerInterval = "MouseJigglerInterval"; - public static readonly string MouseJigglerMethod = "MouseJigglerMethod"; public static readonly string EnableRdsAadAuth = "EnableRdsAadAuth"; public static readonly string EnableHardwareMode = "EnableHardwareMode"; + public static readonly string MouseJigglerInterval = "MouseJigglerInterval"; + public static readonly string MouseJigglerMethod = "MouseJigglerMethod"; public static readonly string PasswordContainsSmartcardPin = "PasswordContainsSCardPin"; public static readonly string RestrictedLogon = "RestrictedLogon"; public static readonly string RedirectedAuthentication = "RedirectedAuthentication"; + public static readonly string ShowConnectionInformation = "ShowConnectionInformation"; /// /// Applies the RdpClientConfiguration to the RdpClient. diff --git a/src/RoyalApps.Community.Rdp.WinForms/Interfaces/IRdpClient.cs b/src/RoyalApps.Community.Rdp.WinForms/Interfaces/IRdpClient.cs index 41488a4..6e2d895 100644 --- a/src/RoyalApps.Community.Rdp.WinForms/Interfaces/IRdpClient.cs +++ b/src/RoyalApps.Community.Rdp.WinForms/Interfaces/IRdpClient.cs @@ -730,6 +730,11 @@ public interface IRdpClient : IDisposable #region ::: Misc ::: + /// + /// Shows the Connection Information dialog. + /// + bool ShowConnectionInformation { get; set; } + /// /// ILogger instance. If not set, a default debug logger is used during debug mode. ///