Ejemplo n.º 1
0
 /// <summary>
 /// Событие DownloadCompleted для всех
 /// </summary>
 /// <param name="e"></param>
 /// <param name="sender"></param>
 void client_DownloadCompleted(object sender, DownloadCompletedEventArgs e)
 {
     if (e.Error != null && this.Status != StateDownload.Stopped)
        {
        this.Cancel();
        this.OnDownloadCompleted(new DownloadCompletedEventArgs( null, this.DownloadedSize, this.TotalSize, this.TotalUsedTime,e.Error));
        Server.SignalCompleting(this.HostName, this.id, this.Status, this.Url.AbsoluteUri, this.TotalSize, this.DownloadedSize,this.TotalUsedTime);
        }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Если загрузка завершена успешно
 /// </summary>
 /// <param name="e"></param>
 protected virtual void OnDownloadCompleted(DownloadCompletedEventArgs e)
 {
     if (e.Error != null && this.status != StateDownload.Stopped)
     {
         this.Status = StateDownload.Completed;
     }
     if (DownloadCompleted != null)
     {
         DownloadCompleted(this, e);
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Событие DownloadCompleted 
 /// </summary>
 protected virtual void OnDownloadCompleted(DownloadCompletedEventArgs e)
 {
     if (DownloadCompleted != null)
        {
        DownloadCompleted(this, e);
        }
 }
Ejemplo n.º 4
0
 void DownloadCompleted(object sender, DownloadCompletedEventArgs e)
 {
     if (sf.Count >= 1)
     SignalCompleting(sf[sf.Count - 1].HostName, sf[sf.Count - 1].id, sf[sf.Count-1].Status, sf[sf.Count - 1].Url.AbsoluteUri,sf[sf.Count - 1].TotalSize, e.DownloadedSize,e.TotalTime);
 }