public static ProtocolHostBase Get(ProtocolServerBase server, double width = 0, double height = 0) { switch (server) { case ProtocolServerRDP _: { var host = new AxMsRdpClient09Host(server, width, height); return(host); } case ProtocolServerSSH ssh: { var host = new PuttyHost(ssh); return(host); } case ProtocolServerTelnet telnet: { var host = new PuttyHost(telnet); return(host); } default: throw new NotImplementedException(); } }
public static bool IsConnWithFullScreen(this ProtocolServerBase server) { switch (server) { case ProtocolServerRDP rdp: { if (rdp.RdpFullScreenFlag == ERdpFullScreenFlag.EnableFullAllScreens) { return(true); } if (rdp.IsConnWithFullScreen) { return(true); } return(rdp.AutoSetting?.FullScreenLastSessionIsFullScreen ?? false); } case ProtocolServerSSH _: case ProtocolServerTelnet _: return(false); default: throw new NotImplementedException(); } }
protected ProtocolHostBase(ProtocolServerBase protocolServer, bool canFullScreen = false) { ProtocolServer = protocolServer; CanFullScreen = canFullScreen; }