/// <summary> /// Construct a Parameter structure for Start_RDP_Connection command /// </summary> /// <param name="localAddress">Local address</param> /// <param name="RDPPort">Port for RDP test suite listening</param> /// <param name="DirectApproach">true for 'Direct', false for 'Negotiate'</param> /// <param name="fullScreen">true for full screen, otherwise false</param> /// <returns>RDP_Connection_Configure_Parameters structure</returns> private RDP_Connection_Configure_Parameters GenerateRDPConnectionConfigParameters(string localAddress, uint RDPPort, bool DirectApproach, bool fullScreen) { RDP_Connection_Configure_Parameters config = new RDP_Connection_Configure_Parameters(); config.port = (ushort)RDPPort; config.address = localAddress; config.screenType = RDP_Screen_Type.NORMAL; if (fullScreen) { config.screenType = RDP_Screen_Type.FULL_SCREEN; } config.connectApproach = RDP_Connect_Approach.Negotiate; if (DirectApproach) { config.connectApproach = RDP_Connect_Approach.Direct; } config.desktopWidth = 1024; config.desktopHeight = 768; return(config); }
/// <summary> /// Construct a Parameter structure for Start_RDP_Connection command /// </summary> /// <param name="localAddress">Local address</param> /// <param name="RDPPort">Port for RDP test suite listening</param> /// <param name="DirectApproach">true for 'Direct', false for 'Negotiate'</param> /// <param name="fullScreen">true for full screen, otherwise false</param> /// <returns>RDP_Connection_Configure_Parameters structure</returns> private RDP_Connection_Configure_Parameters GenerateRDPConnectionConfigParameters(string localAddress, uint RDPPort, bool DirectApproach, bool fullScreen) { RDP_Connection_Configure_Parameters config = new RDP_Connection_Configure_Parameters(); config.port = (ushort)RDPPort; config.address = localAddress; config.screenType = RDP_Screen_Type.NORMAL; if (fullScreen) { config.screenType = RDP_Screen_Type.FULL_SCREEN; } config.connectApproach = RDP_Connect_Approach.Negotiate; if (DirectApproach) { config.connectApproach = RDP_Connect_Approach.Direct; } config.desktopWidth = 1024; config.desktopHeight = 768; return config; }