Beispiel #1
0
 protected virtual void OnStopDownloadFile(WebReaderEventArgs e)
 {
     if (this.StopDownloadFile != null)
     {
         this.StopDownloadFile(this, e);
     }
 }
Beispiel #2
0
 private void WebReader_StartDownloadFile(object sender, WebReaderEventArgs e)
 {
     if (this.InvokeRequired)
     {
         this.Invoke(new WebReaderEventHandler(WebReader_StartDownloadFile), sender, e);
         return;
     }
     _progressBar.Value = 0;
     this.WriteLog(string.Format("Download '{0}' - ", e.File.FullName));
 }
Beispiel #3
0
 private void WebReader_StopDownloadFile(object sender, WebReaderEventArgs e)
 {
     if (this.InvokeRequired)
     {
         this.Invoke(new WebReaderEventHandler(WebReader_StopDownloadFile), sender, e);
     }
     else
     {
         _lblProcessName.Text = "";
         _progressBar.Value   = 0;
         if (e.Error != UpdateManagerError.None)
         {
             this.WriteLog(string.Format("{0}=\"{1}\"", UpdateManagerErrorParse.ToString(e.Error), e.ErrorMessage));
         }
         else
         {
             this.WriteLog(string.Format("ok ({0})", UpdateDetailsManager.ConvertToSize(e.Size)));
         }
         this.WriteLog(Environment.NewLine);
     }
 }