public void OnDesktopRequest(DesktopAction action)
 {
     if (action == DesktopAction.Start && !IsStreamingDesktop)
     {
         new Thread(this.StreamDesktop).Start();
     }
     else if (action == DesktopAction.Stop && IsStreamingDesktop)
     {
         IsStreamingDesktop = false;
     }
 }
示例#2
0
 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);
     }
 }