Exemple #1
0
 private void OnWorkerCompleted(object sender, StreamCopyCompleteEventArgs eventArgs)
 {
     try
     {
         OnDownloadCompleted(downloadWebClient, new AsyncCompletedEventArgs(eventArgs.Exception, eventArgs.CompleteState == CompletedState.Canceled, null));
     }
     finally
     {
         worker.ProgressChanged -= OnWorkerProgressChanged;
         worker.Completed       -= OnWorkerCompleted;
         worker.Dispose();
     }
 }
Exemple #2
0
 private void OnCompleted(StreamCopyCompleteEventArgs args)
 {
     Completed.SafeInvoke(this, args);
 }