mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 14:07:46 +08:00
Merge pull request #2394 from BlueBlock/fix_rdp_operation
Fix RDP operation
This commit is contained in:
@@ -261,7 +261,7 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml
|
||||
}
|
||||
else
|
||||
{
|
||||
connectionInfo.Port = (int)RdpProtocol6.Defaults.Port;
|
||||
connectionInfo.Port = (int)RdpProtocol.Defaults.Port;
|
||||
connectionInfo.Protocol = ProtocolType.RDP;
|
||||
}
|
||||
|
||||
@@ -283,7 +283,7 @@ namespace mRemoteNG.Config.Serializers.ConnectionSerializers.Xml
|
||||
if (xmlnode.GetAttributeAsBool("UseVNC"))
|
||||
connectionInfo.Port = (int)ProtocolVNC.Defaults.Port;
|
||||
else
|
||||
connectionInfo.Port = (int)RdpProtocol6.Defaults.Port;
|
||||
connectionInfo.Port = (int)RdpProtocol.Defaults.Port;
|
||||
}
|
||||
|
||||
connectionInfo.UseConsoleSession = false;
|
||||
|
||||
@@ -251,7 +251,7 @@ namespace mRemoteNG.Connection
|
||||
switch (protocol)
|
||||
{
|
||||
case ProtocolType.RDP:
|
||||
return (int)RdpProtocol6.Defaults.Port;
|
||||
return (int)RdpProtocol.Defaults.Port;
|
||||
case ProtocolType.VNC:
|
||||
return (int)ProtocolVNC.Defaults.Port;
|
||||
case ProtocolType.SSH1:
|
||||
|
||||
@@ -12,7 +12,6 @@ using mRemoteNG.Config.Putty;
|
||||
using mRemoteNG.Config.Serializers.ConnectionSerializers.MsSql;
|
||||
using mRemoteNG.Connection.Protocol;
|
||||
using mRemoteNG.Messages;
|
||||
using mRemoteNG.Properties;
|
||||
using mRemoteNG.Security;
|
||||
using mRemoteNG.Tools;
|
||||
using mRemoteNG.Tree;
|
||||
@@ -75,8 +74,10 @@ namespace mRemoteNG.Connection
|
||||
{
|
||||
try
|
||||
{
|
||||
var uriBuilder = new UriBuilder();
|
||||
uriBuilder.Scheme = "dummyscheme";
|
||||
var uriBuilder = new UriBuilder
|
||||
{
|
||||
Scheme = "dummyscheme"
|
||||
};
|
||||
|
||||
if (connectionString.Contains("@"))
|
||||
{
|
||||
|
||||
@@ -134,7 +134,7 @@ namespace mRemoteNG.Connection.Protocol
|
||||
}
|
||||
}
|
||||
|
||||
public override void Resize(object sender, EventArgs e)
|
||||
protected override void Resize(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace mRemoteNG.Connection.Protocol.PowerShell
|
||||
}
|
||||
}
|
||||
|
||||
public override void Resize(object sender, EventArgs e)
|
||||
protected override void Resize(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -5,7 +5,6 @@ using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.UI.Tabs;
|
||||
using System.Runtime.Versioning;
|
||||
using mRemoteNG.UI.Forms;
|
||||
|
||||
// ReSharper disable UnusedMember.Local
|
||||
|
||||
@@ -63,7 +62,7 @@ namespace mRemoteNG.Connection.Protocol
|
||||
|
||||
public ConnectionInfo.Force Force { get; set; }
|
||||
|
||||
public readonly System.Timers.Timer tmrReconnect = new System.Timers.Timer(5000);
|
||||
protected readonly System.Timers.Timer tmrReconnect = new System.Timers.Timer(5000);
|
||||
protected ReconnectGroup ReconnectGroup;
|
||||
|
||||
protected ProtocolBase(string name)
|
||||
@@ -93,15 +92,15 @@ namespace mRemoteNG.Connection.Protocol
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void ResizeBegin(object sender, EventArgs e)
|
||||
protected virtual void ResizeBegin(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Resize(object sender, EventArgs e)
|
||||
protected virtual void Resize(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void ResizeEnd(object sender, EventArgs e)
|
||||
protected virtual void ResizeEnd(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -222,6 +221,10 @@ namespace mRemoteNG.Connection.Protocol
|
||||
|
||||
private void SetTagToNothing()
|
||||
{
|
||||
if (!_interfaceControl.IsAccessible || _interfaceControl.IsDisposed ||
|
||||
!_interfaceControl.Parent.IsAccessible || _interfaceControl.Parent.IsDisposed)
|
||||
{ return; }
|
||||
|
||||
if (_interfaceControl.Parent.InvokeRequired)
|
||||
{
|
||||
var s = new SetTagToNothingCB(SetTagToNothing);
|
||||
@@ -238,10 +241,7 @@ namespace mRemoteNG.Connection.Protocol
|
||||
private void DisposeControl()
|
||||
{
|
||||
// do not attempt to dispose the control if the control is already closed, closing or disposed
|
||||
if (Control == null || !Control.IsAccessible || Control.IsDisposed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (Control == null || !Control.IsAccessible || Control.IsDisposed) { return; }
|
||||
|
||||
if (Control.InvokeRequired)
|
||||
{
|
||||
|
||||
@@ -7,7 +7,6 @@ using mRemoteNG.Connection.Protocol.Telnet;
|
||||
using mRemoteNG.Connection.Protocol.VNC;
|
||||
using System;
|
||||
using mRemoteNG.Connection.Protocol.PowerShell;
|
||||
using mRemoteNG.Properties;
|
||||
using mRemoteNG.Resources.Language;
|
||||
using System.Runtime.Versioning;
|
||||
|
||||
|
||||
@@ -265,7 +265,7 @@ namespace mRemoteNG.Connection.Protocol
|
||||
}
|
||||
}
|
||||
|
||||
public override void Resize(object sender, EventArgs e)
|
||||
protected override void Resize(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,25 +1,27 @@
|
||||
using System.Runtime.Versioning;
|
||||
using System.Windows.Forms;
|
||||
using AxMSTSCLib;
|
||||
using MSTSCLib;
|
||||
|
||||
namespace mRemoteNG.Connection.Protocol.RDP
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class RdpProtocol10 : RdpProtocol9
|
||||
{
|
||||
private MsRdpClient10NotSafeForScripting RdpClient10 => (MsRdpClient10NotSafeForScripting)((AxHost)Control).GetOcx();
|
||||
|
||||
protected override RdpVersion RdpProtocolVersion => RdpVersion.Rdc10;
|
||||
|
||||
protected override RdpVersion RdpProtocolVersion => RDP.RdpVersion.Rdc10;
|
||||
|
||||
protected override AxHost CreateActiveXRdpClientControl()
|
||||
{
|
||||
return new AxMsRdpClient10NotSafeForScripting();
|
||||
return new AxMsRdpClient11NotSafeForScripting();
|
||||
}
|
||||
|
||||
protected override void UpdateSessionDisplaySettings(uint width, uint height)
|
||||
public override bool Initialize()
|
||||
{
|
||||
RdpClient10.UpdateSessionDisplaySettings(width, height, width, height, 0, 1, 1);
|
||||
if (!base.Initialize())
|
||||
return false;
|
||||
|
||||
if (RdpVersion < Versions.RDC100) return false; // minimum dll version checked, loaded MSTSCLIB dll version is not capable
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,25 +1,26 @@
|
||||
using System.Runtime.Versioning;
|
||||
using System.Windows.Forms;
|
||||
using AxMSTSCLib;
|
||||
using MSTSCLib;
|
||||
|
||||
namespace mRemoteNG.Connection.Protocol.RDP
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class RdpProtocol11 : RdpProtocol10
|
||||
{
|
||||
private MsRdpClient11NotSafeForScripting RdpClient11 => (MsRdpClient11NotSafeForScripting)((AxHost)Control).GetOcx();
|
||||
|
||||
protected override RdpVersion RdpProtocolVersion => RdpVersion.Rdc11;
|
||||
protected override RdpVersion RdpProtocolVersion => RDP.RdpVersion.Rdc11;
|
||||
|
||||
protected override AxHost CreateActiveXRdpClientControl()
|
||||
{
|
||||
return new AxMsRdpClient11NotSafeForScripting();
|
||||
}
|
||||
|
||||
protected override void UpdateSessionDisplaySettings(uint width, uint height)
|
||||
public override bool Initialize()
|
||||
{
|
||||
RdpClient11.UpdateSessionDisplaySettings(width, height, width, height, 0, 1, 1);
|
||||
if (!base.Initialize())
|
||||
return false;
|
||||
|
||||
if (RdpVersion < Versions.RDC100) return false; // minimum dll version checked, loaded MSTSCLIB dll version is not capable
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,9 +9,10 @@ using System.Runtime.Versioning;
|
||||
namespace mRemoteNG.Connection.Protocol.RDP
|
||||
{
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class RdpProtocol7 : RdpProtocol6
|
||||
public class RdpProtocol7 : RdpProtocol
|
||||
{
|
||||
protected override RdpVersion RdpProtocolVersion => RdpVersion.Rdc7;
|
||||
private MsRdpClient7NotSafeForScripting RdpClient7 => (MsRdpClient7NotSafeForScripting)((AxHost)Control).GetOcx();
|
||||
protected override RdpVersion RdpProtocolVersion => RDP.RdpVersion.Rdc7;
|
||||
|
||||
public override bool Initialize()
|
||||
{
|
||||
@@ -20,20 +21,21 @@ namespace mRemoteNG.Connection.Protocol.RDP
|
||||
|
||||
try
|
||||
{
|
||||
var rdpClient7 = (MsRdpClient7NotSafeForScripting)((AxHost) Control).GetOcx();
|
||||
rdpClient7.AdvancedSettings8.AudioQualityMode = (uint)connectionInfo.SoundQuality;
|
||||
rdpClient7.AdvancedSettings8.AudioCaptureRedirectionMode = connectionInfo.RedirectAudioCapture;
|
||||
rdpClient7.AdvancedSettings8.NetworkConnectionType = (int)RdpNetworkConnectionType.Modem;
|
||||
if (RdpVersion < Versions.RDC70) return false; // loaded MSTSCLIB dll version is not capable
|
||||
|
||||
RdpClient7.AdvancedSettings8.AudioQualityMode = (uint)connectionInfo.SoundQuality;
|
||||
RdpClient7.AdvancedSettings8.AudioCaptureRedirectionMode = connectionInfo.RedirectAudioCapture;
|
||||
RdpClient7.AdvancedSettings8.NetworkConnectionType = (int)RdpNetworkConnectionType.Modem;
|
||||
|
||||
if (connectionInfo.UseVmId)
|
||||
{
|
||||
SetExtendedProperty("DisableCredentialsDelegation", true);
|
||||
rdpClient7.AdvancedSettings7.AuthenticationServiceClass = "Microsoft Virtual Console Service";
|
||||
rdpClient7.AdvancedSettings8.EnableCredSspSupport = true;
|
||||
rdpClient7.AdvancedSettings8.NegotiateSecurityLayer = false;
|
||||
rdpClient7.AdvancedSettings7.PCB = $"{connectionInfo.VmId}";
|
||||
RdpClient7.AdvancedSettings7.AuthenticationServiceClass = "Microsoft Virtual Console Service";
|
||||
RdpClient7.AdvancedSettings8.EnableCredSspSupport = true;
|
||||
RdpClient7.AdvancedSettings8.NegotiateSecurityLayer = false;
|
||||
RdpClient7.AdvancedSettings7.PCB = $"{connectionInfo.VmId}";
|
||||
if (connectionInfo.UseEnhancedMode)
|
||||
rdpClient7.AdvancedSettings7.PCB += ";EnhancedMode=1";
|
||||
RdpClient7.AdvancedSettings7.PCB += ";EnhancedMode=1";
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -47,7 +49,8 @@ namespace mRemoteNG.Connection.Protocol.RDP
|
||||
|
||||
protected override AxHost CreateActiveXRdpClientControl()
|
||||
{
|
||||
return new AxMsRdpClient7NotSafeForScripting();
|
||||
return new AxMsRdpClient11NotSafeForScripting();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,18 +21,28 @@ namespace mRemoteNG.Connection.Protocol.RDP
|
||||
public class RdpProtocol8 : RdpProtocol7
|
||||
{
|
||||
private MsRdpClient8NotSafeForScripting RdpClient8 => (MsRdpClient8NotSafeForScripting)((AxHost)Control).GetOcx();
|
||||
private Size _controlBeginningSize;
|
||||
|
||||
protected override RdpVersion RdpProtocolVersion => RdpVersion.Rdc8;
|
||||
protected override RdpVersion RdpProtocolVersion => RDP.RdpVersion.Rdc8;
|
||||
|
||||
public override bool SmartSize
|
||||
public override bool Initialize()
|
||||
{
|
||||
get => base.SmartSize;
|
||||
protected set
|
||||
if (!base.Initialize())
|
||||
return false;
|
||||
|
||||
if (RdpVersion < Versions.RDC81) return false; // minimum dll version checked, loaded MSTSCLIB dll version is not capable
|
||||
|
||||
// https://learn.microsoft.com/en-us/windows/win32/termserv/imsrdpextendedsettings-property
|
||||
if (connectionInfo.UseRestrictedAdmin)
|
||||
{
|
||||
base.SmartSize = value;
|
||||
DoResizeClient();
|
||||
SetExtendedProperty("RestrictedLogon", true);
|
||||
}
|
||||
else if (connectionInfo.UseRCG)
|
||||
{
|
||||
SetExtendedProperty("DisableCredentialsDelegation", true);
|
||||
SetExtendedProperty("RedirectedAuthentication", true);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool Fullscreen
|
||||
@@ -45,28 +55,17 @@ namespace mRemoteNG.Connection.Protocol.RDP
|
||||
}
|
||||
}
|
||||
|
||||
public override void ResizeBegin(object sender, EventArgs e)
|
||||
protected override void Resize(object sender, EventArgs e)
|
||||
{
|
||||
_controlBeginningSize = Control.Size;
|
||||
if (_frmMain.PreviousWindowState == _frmMain.WindowState) return;
|
||||
DoResizeControl();
|
||||
DoResizeClient();
|
||||
}
|
||||
|
||||
public override void Resize(object sender, EventArgs e)
|
||||
{
|
||||
if (DoResizeControl() && _controlBeginningSize.IsEmpty)
|
||||
{
|
||||
DoResizeClient();
|
||||
}
|
||||
base.Resize(sender, e);
|
||||
}
|
||||
|
||||
public override void ResizeEnd(object sender, EventArgs e)
|
||||
protected override void ResizeEnd(object sender, EventArgs e)
|
||||
{
|
||||
DoResizeControl();
|
||||
if (!(Control.Size == _controlBeginningSize))
|
||||
{
|
||||
DoResizeClient();
|
||||
}
|
||||
_controlBeginningSize = Size.Empty;
|
||||
DoResizeClient();
|
||||
}
|
||||
|
||||
protected override AxHost CreateActiveXRdpClientControl()
|
||||
@@ -97,13 +96,13 @@ namespace mRemoteNG.Connection.Protocol.RDP
|
||||
var size = Fullscreen
|
||||
? Screen.FromControl(Control).Bounds.Size
|
||||
: Control.Size;
|
||||
|
||||
UpdateSessionDisplaySettings((uint)size.Width, (uint)size.Height);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Runtime.MessageCollector.AddExceptionMessage(
|
||||
string.Format(Language.ChangeConnectionResolutionError,
|
||||
connectionInfo.Hostname),
|
||||
string.Format(Language.ChangeConnectionResolutionError, connectionInfo.Hostname),
|
||||
ex, MessageClass.WarningMsg, false);
|
||||
}
|
||||
}
|
||||
@@ -112,20 +111,15 @@ namespace mRemoteNG.Connection.Protocol.RDP
|
||||
{
|
||||
Control.Location = InterfaceControl.Location;
|
||||
// kmscode - this doesn't look right to me. But I'm not aware of any functionality issues with this currently...
|
||||
if (!(Control.Size == InterfaceControl.Size) && !(InterfaceControl.Size == Size.Empty))
|
||||
{
|
||||
Control.Size = InterfaceControl.Size;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (Control.Size == InterfaceControl.Size || InterfaceControl.Size == Size.Empty) return false;
|
||||
Control.Size = InterfaceControl.Size;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected virtual void UpdateSessionDisplaySettings(uint width, uint height)
|
||||
{
|
||||
RdpClient8.Reconnect(width, height);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,22 @@ namespace mRemoteNG.Connection.Protocol.RDP
|
||||
{
|
||||
private MsRdpClient9NotSafeForScripting RdpClient9 => (MsRdpClient9NotSafeForScripting)((AxHost)Control).GetOcx();
|
||||
|
||||
protected override RdpVersion RdpProtocolVersion => RdpVersion.Rdc9;
|
||||
protected override RdpVersion RdpProtocolVersion => RDP.RdpVersion.Rdc9;
|
||||
|
||||
public RdpProtocol9()
|
||||
{
|
||||
_frmMain.ResizeEnd += ResizeEnd;
|
||||
}
|
||||
|
||||
public override bool Initialize()
|
||||
{
|
||||
if (!base.Initialize())
|
||||
return false;
|
||||
|
||||
if (RdpVersion < Versions.RDC81) return false; // minimum dll version checked, loaded MSTSCLIB dll version is not capable
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override AxHost CreateActiveXRdpClientControl()
|
||||
{
|
||||
@@ -20,7 +35,15 @@ namespace mRemoteNG.Connection.Protocol.RDP
|
||||
|
||||
protected override void UpdateSessionDisplaySettings(uint width, uint height)
|
||||
{
|
||||
RdpClient9.UpdateSessionDisplaySettings(width, height, width, height, 0, 1, 1);
|
||||
try
|
||||
{
|
||||
RdpClient9.UpdateSessionDisplaySettings(width, height, width, height, Orientation, DesktopScaleFactor, DeviceScaleFactor);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// target OS does not support newer method, fallback to an older method
|
||||
base.UpdateSessionDisplaySettings(width, height);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,14 +8,14 @@ namespace mRemoteNG.Connection.Protocol.RDP
|
||||
[SupportedOSPlatform("windows")]
|
||||
public class RdpProtocolFactory
|
||||
{
|
||||
public RdpProtocol6 Build(RdpVersion rdpVersion)
|
||||
public RdpProtocol Build(RdpVersion rdpVersion)
|
||||
{
|
||||
switch (rdpVersion)
|
||||
{
|
||||
case RdpVersion.Highest:
|
||||
return BuildHighestSupportedVersion();
|
||||
case RdpVersion.Rdc6:
|
||||
return new RdpProtocol6();
|
||||
return new RdpProtocol();
|
||||
case RdpVersion.Rdc7:
|
||||
return new RdpProtocol7();
|
||||
case RdpVersion.Rdc8:
|
||||
@@ -31,7 +31,7 @@ namespace mRemoteNG.Connection.Protocol.RDP
|
||||
}
|
||||
}
|
||||
|
||||
private RdpProtocol6 BuildHighestSupportedVersion()
|
||||
private RdpProtocol BuildHighestSupportedVersion()
|
||||
{
|
||||
var versions = Enum.GetValues(typeof(RdpVersion))
|
||||
.OfType<RdpVersion>()
|
||||
|
||||
@@ -27,6 +27,7 @@ namespace mRemoteNG.Messages.MessageWriters
|
||||
|
||||
private void AddToList(ListViewItem lvItem)
|
||||
{
|
||||
if (!_messageWindow.IsAccessible || _messageWindow.IsDisposed) { return; }
|
||||
if (_messageWindow.lvErrorCollector.InvokeRequired)
|
||||
_messageWindow.lvErrorCollector.Invoke((MethodInvoker)(() => AddToList(lvItem)));
|
||||
else
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace mRemoteNG.Tools
|
||||
/// </summary>
|
||||
public Optional()
|
||||
{
|
||||
_optional = new T[0];
|
||||
_optional = Array.Empty<T>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -30,7 +30,7 @@ namespace mRemoteNG.Tools
|
||||
{
|
||||
_optional = value != null
|
||||
? new[] {value}
|
||||
: new T[0];
|
||||
: Array.Empty<T>();
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
@@ -97,9 +97,7 @@ namespace mRemoteNG.Tools
|
||||
if (_optional[0] is IComparable<T>)
|
||||
return ((IComparable<T>)_optional[0]).CompareTo(other.First());
|
||||
|
||||
throw new ArgumentException(string.Format(
|
||||
"Cannot compare objects. Optional type {0} is not comparable to itself",
|
||||
typeof(T).FullName));
|
||||
throw new ArgumentException($"Cannot compare objects. Optional type {typeof(T).FullName} is not comparable to itself");
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -121,7 +119,7 @@ namespace mRemoteNG.Tools
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool Equals(Optional<T> other)
|
||||
private bool Equals(Optional<T> other)
|
||||
{
|
||||
var otherObj = other.FirstOrDefault();
|
||||
var thisObj = _optional.FirstOrDefault();
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace mRemoteNG.Tools
|
||||
public static int HttpPort { get; set; } = (int)ProtocolHTTP.Defaults.Port;
|
||||
public static int HttpsPort { get; set; } = (int)ProtocolHTTPS.Defaults.Port;
|
||||
public static int RloginPort { get; set; } = (int)ProtocolRlogin.Defaults.Port;
|
||||
public static int RdpPort { get; set; } = (int)RdpProtocol6.Defaults.Port;
|
||||
public static int RdpPort { get; set; } = (int)RdpProtocol.Defaults.Port;
|
||||
public static int VncPort { get; set; } = (int)ProtocolVNC.Defaults.Port;
|
||||
public ArrayList OpenPorts { get; set; }
|
||||
public ArrayList ClosedPorts { get; set; }
|
||||
|
||||
@@ -375,7 +375,7 @@ namespace mRemoteNG.UI.Window
|
||||
|
||||
if (interfaceControl.Info.Protocol == ProtocolType.RDP)
|
||||
{
|
||||
var rdp = (RdpProtocol6)interfaceControl.Protocol;
|
||||
var rdp = (RdpProtocol)interfaceControl.Protocol;
|
||||
cmenTabFullscreen.Visible = true;
|
||||
cmenTabFullscreen.Checked = rdp.Fullscreen;
|
||||
cmenTabSmartSize.Visible = true;
|
||||
@@ -433,7 +433,7 @@ namespace mRemoteNG.UI.Window
|
||||
|
||||
switch (interfaceControl.Protocol)
|
||||
{
|
||||
case RdpProtocol6 rdp:
|
||||
case RdpProtocol rdp:
|
||||
rdp.ToggleSmartSize();
|
||||
break;
|
||||
}
|
||||
@@ -562,7 +562,7 @@ namespace mRemoteNG.UI.Window
|
||||
try
|
||||
{
|
||||
var interfaceControl = GetInterfaceControl();
|
||||
var rdp = interfaceControl?.Protocol as RdpProtocol6;
|
||||
var rdp = interfaceControl?.Protocol as RdpProtocol;
|
||||
rdp?.ToggleFullscreen();
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
Reference in New Issue
Block a user