internal static void Initialize(MainForm form) { using (RdpClient5 rdpClient = new RdpClient5(form)) { RdpControlVersion = rdpClient.Version; string[] array = rdpClient.Version.Split('.'); RdpClientVersion = 5; if (int.Parse(array[2]) >= 6001) { RdpClientVersion = 6; SupportsMonitorSpanning = true; if (int.Parse(array[2]) >= 7600) { RdpClientVersion = 7; if (int.Parse(array[2]) >= 9200) { RdpClientVersion = 8; } } } form.RemoveFromClientPanel(rdpClient); } StaticClient = new RdpClient(form); RdpClient staticClient = StaticClient; staticClient.Control.Enabled = false; MaxDesktopWidth = 4096; MaxDesktopHeight = 2048; if (staticClient.AdvancedSettings7 != null) { SupportsGatewayCredentials = true; } if (staticClient.AdvancedSettings8 != null) { SupportsAdvancedAudioVideoRedirection = true; } if (staticClient.ClientNonScriptable3 != null) { SupportsFineGrainedRedirection = true; } if (staticClient.MsRdpClient8 != null) { SupportsRemoteSessionActions = true; } }
private RdpClient(MainForm form) { switch (RdpClientVersion) { case 8: _rdpClient8 = new RdpClient8(form); break; case 7: _rdpClient7 = new RdpClient7(form); break; case 6: _rdpClient6 = new RdpClient6(form); break; default: _rdpClient5 = new RdpClient5(form); break; } }