private void RemoteDesktopResponseHandler(RemoteDesktopResponse response) { if (!response.Cancel) { RemoteDesktopRequest request = new RemoteDesktopRequest(); request.CallbackID = response.CallbackID; SendMessage(request); } else { callBacks.RemoveAll(x => x.ID == response.CallbackID); } }
private void RemoteDesktopRequestHandler(RemoteDesktopRequest request) { RemoteDesktopResponse response = new RemoteDesktopResponse(request); try { response.FrameBytes = Helpers.RemoteDesktop.CaptureScreenToMemoryStream(request.Quality); } catch (Exception e) { response.HasError = true; response.Exception = e; } SendMessage(response); }
private void RemoteDesktopRequestHandler(RemoteDesktopRequest request) { RemoteDesktopResponse response = new RemoteDesktopResponse(request); try { var image = Helpers.RemoteDesktop.CaptureScreenToMemoryStream(request.Quality); var encryptionkey = clientPublicEncryptionkeys[request.SenderClient]; var encript = UtilityFunction.EncryptStream(image, encryptionkey.FirstX, encryptionkey.U, encryptionkey.SelectChoas); response.FrameBytes = encript; } catch (Exception e) { response.HasError = true; response.Exception = e; } SendMessage(response); }