public string PushCursorUpdate(byte[] data) { if (data != null) { Image cursor; int cursorX, cursorY; Guid id; Utils.UnpackCursorCaptureData(data, out cursor, out cursorX, out cursorY, out id); ViewSession viewSession; if (!_sessions.ContainsKey(id)) { viewSession = new ViewSession { Id = id, Ip = this.GetIp() }; _sessions[id] = viewSession; } else { viewSession = _sessions[id]; } viewSession.Cursor = cursor; viewSession.CursorX = cursorX; viewSession.CursorY = cursorY; UpdateScreenImage(id); } return Commands.SerializeCommandStack(); }
public void PushScreenUpdate(byte[] data) { if (data == null) return; Image partial; Rectangle bounds; Guid id; Utils.UnpackScreenCaptureData(data, out partial, out bounds, out id); ViewSession viewSession; if (!_sessions.ContainsKey(id)) { viewSession = new ViewSession { Id = id, Ip = this.GetIp() }; _sessions[id] = viewSession; } else { viewSession = _sessions[id]; } Utils.UpdateScreenImage(ref viewSession.Screen, partial, bounds); UpdateScreenImage(id); }