Ejemplo n.º 1
0
 private void CancelAllResult(String response)
 {
     try
     {
         CancelAllResultHandler?.Invoke(JsonRequest.GetResult(response).result.Equals("OK"));
         _downloadItems.Clear();
     }
     catch (Exception e)
     {
         CancelAllResultHandler?.Invoke(false);
         ExceptionHelper.ShowErrorMsg("CancelAllResult", e);
     }
 }
Ejemplo n.º 2
0
 private void CancelSingleResult(String response)
 {
     try
     {
         String       gid          = JsonRequest.GetResult(response).result;
         DownloadItem downloadItem = _downloadItems.First(item => item.GetGid.Equals(gid));
         _downloadItems.Remove(downloadItem);
         CancelSingleResultHandler?.Invoke(downloadItem);
     }
     catch (Exception e)
     {
         CancelSingleResultHandler?.Invoke(null);
         ExceptionHelper.ShowErrorMsg("CancelSingleResult", e);
     }
 }
Ejemplo n.º 3
0
 private void ShutDownResult(String response)
 {
     try
     {
         if (JsonRequest.GetResult(response).result.Equals("OK"))
         {
             _isListening = false;
             _webSocket.Abort();
             _webSocket.Dispose();
         }
     }
     catch (Exception e)
     {
         ExceptionHelper.ShowErrorMsg("ShutDownResult", e);
     }
 }