Example #1
0
        protected void doConnect()
        {
            MsRdpClient8NotSafeForScripting rdp;

            rdp          = (MsRdpClient8NotSafeForScripting)ClientControl.GetOcx();
            rdp.Server   = _connectionConfig.ServerName;
            rdp.UserName = _connectionConfig.UserName;
            rdp.AdvancedSettings8.ClearTextPassword      = _connectionConfig.Password;
            rdp.AdvancedSettings8.AuthenticationLevel    = 2;
            rdp.AdvancedSettings8.EnableCredSspSupport   = true;
            rdp.AdvancedSettings8.NegotiateSecurityLayer = false;
            //rdp.AdvancedSettings8.SmartSizing = FitToWindow;
            rdp.AdvancedSettings8.ContainerHandledFullScreen = -1;
            //rdp.AdvancedSettings8.AudioCaptureRedirectionMode
            //rdp.AdvancedSettings8.
            //rdp.AdvancedSettings8.RelativeMouseMode
            //rdp.AdvancedSettings8.RedirectDrives = true;
            FullScreen = _connectionConfig.FullScreen;
            //rdp.FullScreen = _connectionConfig.FullScreen;
            rdp.DesktopHeight = _connectionConfig.DisplayHeight;
            rdp.DesktopWidth  = _connectionConfig.DisplayWidth;
            SetClientWindowSize(_connectionConfig.DisplayWidth, _connectionConfig.DisplayHeight);
            rdp.ColorDepth = _connectionConfig.ColorDepth;
            ClientControl.Connect();
        }
Example #2
0
 public static void connect()
 {
     client = new ClientControl();
     client.Connect("127.0.0.1", 8080);
     client.Send("game start!");
 }