/** * Event occurs when Client needs to update surface */ public void OnSurfaceCommand(BinaryReader s) { Gtk.Application.Invoke(delegate { SurfaceCommand cmd = SurfaceCommand.Parse(s); if (cmd != null) { cmd.Execute(receiver); window.ProcessUpdates(false); } }); }
/** * Event occurs when Client needs to update surface */ public void OnSurfaceCommand(SurfaceCommand cmd) { byte[] pduBuffer = cmd.Write(); surfaceClient.SendSurfaceCommand(pduBuffer, sessionClient.GetSessionId()); string hostname = config.RdpServerHostname; if (hostname.Equals("localhost") || hostname.Equals("127.0.0.1")) { return; } Gtk.Application.Invoke(delegate { if (cmd != null) { cmd.Execute(receiver); window.ProcessUpdates(false); } }); }
static void ThreadProc(PcapSource pcapSource) { int count = 0; SurfaceCommand cmd; MemoryStream stream; BinaryReader reader; PcapReader pcap = new PcapReader(File.OpenRead(pcapSource.filename)); TimeSpan previousTime = new TimeSpan(0, 0, 0, 0); foreach (PcapRecord record in pcap) { Thread.Sleep(record.Time.Subtract(previousTime)); previousTime = record.Time; stream = new MemoryStream(record.Buffer); reader = new BinaryReader(stream); cmd = SurfaceCommand.Parse(reader); pcapSource.iSource.OnSurfaceCommand(cmd); } pcap.Close(); }
/** * Event occurs when Client needs to update surface */ public void OnSurfaceCommand(SurfaceCommand cmd) { byte[] pduBuffer = cmd.Write(); surfaceClient.SendSurfaceCommand(pduBuffer, sessionClient.GetSessionId()); string hostname = config.RdpServerHostname; if (hostname.Equals("localhost") || hostname.Equals("127.0.0.1")) return; Gtk.Application.Invoke(delegate { if (cmd != null) { cmd.Execute(receiver); window.ProcessUpdates(false); } }); }
public void OnSurfaceCommand(SurfaceCommand cmd) { Gtk.Application.Invoke(delegate { if (cmd != null) { cmd.Execute(receiver); window.ProcessUpdates(false); } }); }