Example #1
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);
     }
 }
Example #2
0
        private void _updateManager_StopUnZipFile(object sender, UnZipFileEventArgs e)
        {
            #region if (this.InvokeRequired) {...}
            if (this.InvokeRequired)
            {
                this.Invoke(new UnZipFileEventHandler(_updateManager_StopUnZipFile), sender, e);
                return;
            }
            #endregion

            _lblProcessName.Text = "";
            _progressBar.Value   = 0;
            if (_updateManager.Error != UpdateManagerError.None)
            {
                this.WriteLog(string.Format("{0}=\"{1}\"", UpdateManagerErrorParse.ToString(_updateManager.Error), _updateManager.ErrorMessage));
            }
            else
            {
                this.WriteLog("ok");
            }
            this.WriteLog(Environment.NewLine);
        }
Example #3
0
 private void _updateManager_StopGetUpdateDetails(object sender, EventArgs e)
 {
     if (this.InvokeRequired)
     {
         this.Invoke(new EventHandler(_updateManager_StopGetUpdateDetails), sender, e);
     }
     else
     {
         _lblProcessName.Text = "";
         if (_updateManager.Error == UpdateManagerError.None)
         {
             _htmlDetails = _updateManager.HtmlDetailsInfo;
         }
         else
         {
             string html = "<html><head><title>{0}</title></head><body><h1>Error</h1><p>{0}=\"{1}\"</p></body></html>";
             _htmlDetails = string.Format(html, UpdateManagerErrorParse.ToString(_updateManager.Error), _updateManager.ErrorMessage);
         }
         SetEnabledButton(true);
         this.OpenHtml();
     }
 }