Пример #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();
     }
 }
Пример #2
0
 private void OnCompleted(StreamCopyCompleteEventArgs args)
 {
     Completed.SafeInvoke(this, args);
 }