Пример #1
0
 public DesktopSnapshot sendControlCommand(ControlCommand ControlCommand)
 {
     WebDesktopTCPClient client = new WebDesktopTCPClient(ControlCommand.MachineName);
     string base64=client.SendControl(ControlCommand);
     DesktopSnapshot snapshot = new DesktopSnapshot();
     snapshot.DesktopBase64 = base64;
     return snapshot;
 }
Пример #2
0
        public DesktopSnapshot sendControlCommand(ControlCommand ControlCommand)
        {
            WebDesktopTCPClient client = new WebDesktopTCPClient(ControlCommand.MachineName);
            string          base64     = client.SendControl(ControlCommand);
            DesktopSnapshot snapshot   = new DesktopSnapshot();

            snapshot.DesktopBase64 = base64;
            return(snapshot);
        }
Пример #3
0
 public DesktopSnapshot getDesktopSnapshot(string MachineName)
 {
     WebDesktopTCPClient client = new WebDesktopTCPClient(MachineName);
     string base64 = client.GetImage();
     DesktopSnapshot snapshot = new DesktopSnapshot();
     snapshot.DesktopBase64 = base64;
     return snapshot;
     //DesktopSnapshot snapshot=new DesktopSnapshot();
     //snapshot.MachineName = MachineName;
     //Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
     //socket.Connect(MachineName, 3390);
     //NetworkStream ns = new NetworkStream(socket);
     //StreamReader sr = new StreamReader(ns);
     //string base64=sr.ReadToEnd();
     //socket.Shutdown(SocketShutdown.Both);
     //socket.Close();
     ////IPHostEntry hostinfo = Dns.GetHostEntry(MachineName);
     //snapshot.DesktopBase64 = base64;
     ////serverIP = IPAddress.Parse("222.18.142.171");
     //return snapshot;
 }
Пример #4
0
        public DesktopSnapshot getDesktopSnapshot(string MachineName)
        {
            WebDesktopTCPClient client = new WebDesktopTCPClient(MachineName);
            string          base64     = client.GetImage();
            DesktopSnapshot snapshot   = new DesktopSnapshot();

            snapshot.DesktopBase64 = base64;
            return(snapshot);
            //DesktopSnapshot snapshot=new DesktopSnapshot();
            //snapshot.MachineName = MachineName;
            //Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
            //socket.Connect(MachineName, 3390);
            //NetworkStream ns = new NetworkStream(socket);
            //StreamReader sr = new StreamReader(ns);
            //string base64=sr.ReadToEnd();
            //socket.Shutdown(SocketShutdown.Both);
            //socket.Close();
            ////IPHostEntry hostinfo = Dns.GetHostEntry(MachineName);
            //snapshot.DesktopBase64 = base64;
            ////serverIP = IPAddress.Parse("222.18.142.171");
            //return snapshot;
        }