public void OnDesktopRequest(DesktopAction action) { if (action == DesktopAction.Start && !IsStreamingDesktop) { new Thread(this.StreamDesktop).Start(); } else if (action == DesktopAction.Stop && IsStreamingDesktop) { IsStreamingDesktop = false; } }
public void OnDesktopImage(Client client, DesktopAction action, byte[] imageData) { if (action == DesktopAction.Push) { UiMediator.OnDesktopImageReceived(client, imageData); } else if (action == DesktopAction.Stop) { UiMediator.OnDesktopStreamClosed(client); } }