コード例 #1
0
 /// <summary>
 /// Raise DownloadCompleted event.
 /// </summary>
 protected virtual void OnDownloadCompleted(
     DownloadCompletedEventArgs e)
 {
     if (DownloadCompleted != null)
     {
         DownloadCompleted(this, e);
     }
 }
コード例 #2
0
        /// <summary>
        /// The method will be called by the OnStatusChanged method.
        /// </summary>
        /// <param name="e"></param>
        protected virtual void OnDownloadCompleted(DownloadCompletedEventArgs e)
        {
            if (e.Error != null && this.status != DownloadStatus.Canceled)
            {
                this.Status = DownloadStatus.Completed;
            }

            if (DownloadCompleted != null)
            {
                DownloadCompleted(this, e);
            }
        }
コード例 #3
0
 /// <summary>
 /// Handle the DownloadCompleted event of all the HttpDownloadClients.
 /// </summary>
 void client_DownloadCompleted(object sender, DownloadCompletedEventArgs e)
 {
     if (e.Error != null &&
         this.Status != DownloadStatus.Canceling &&
         this.Status != DownloadStatus.Canceled)
     {
         this.Cancel();
         this.OnDownloadCompleted(new DownloadCompletedEventArgs(
                                      null,
                                      this.DownloadedSize,
                                      this.TotalSize,
                                      this.TotalUsedTime,
                                      e.Error));
     }
 }
コード例 #4
0
 /// <summary>
 /// Handle the DownloadCompleted event of all the HttpDownloadClients.
 /// </summary>
 void client_DownloadCompleted(object sender, DownloadCompletedEventArgs e)
 {
     if (e.Error != null
         && this.Status != DownloadStatus.Canceling
         && this.Status != DownloadStatus.Canceled)
     {
         this.Cancel();
         this.OnDownloadCompleted(new DownloadCompletedEventArgs(
             null,
             this.DownloadedSize,
             this.TotalSize,
             this.TotalUsedTime,
             e.Error));
     }
 }
コード例 #5
0
 /// <summary>
 /// Raise DownloadCompleted event.
 /// </summary>
 protected virtual void OnDownloadCompleted(
     DownloadCompletedEventArgs e)
 {
     if (DownloadCompleted != null)
     {
         DownloadCompleted(this, e);
     }
 }
コード例 #6
0
        /// <summary>
        /// The method will be called by the OnStatusChanged method.
        /// </summary>
        /// <param name="e"></param>
        protected virtual void OnDownloadCompleted(DownloadCompletedEventArgs e)
        {
            if (e.Error != null && this.status != DownloadStatus.Canceled)
            {
                this.Status = DownloadStatus.Completed;
            }

            if (DownloadCompleted != null)
            {
                DownloadCompleted(this, e);
            }
        }