示例#1
0
 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);
     }
 }
示例#2
0
        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);
        }
示例#3
0
        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);
        }