コード例 #1
0
 protected virtual void OnChppDownloadProgressChanged(ChppDownloadProgressChangedEventArgs eventArgs)
 {
     if (ChppDownloadProgressChanged != null)
     {
         ChppDownloadProgressChanged(eventArgs);
     }
 }
コード例 #2
0
        private void UpdateDownloadStatus(ChppDownloadProgressChangedEventArgs eventArgs)
        {
            try {
                if (this.InvokeRequired)
                {
                    this.Invoke(new UpdateDownloadStatusCallback(UpdateDownloadStatus), eventArgs);
                }
                else
                {
                    progressBarDownload.Maximum = eventArgs.TotalFilesToDownload;
                    progressBarDownload.Value   = eventArgs.FilesDownloaded;
                    AddDownloadItem(resourceManager.GetString(eventArgs.FileName), eventArgs.DownloadFinished);
                }

                if (eventArgs.DownloadFinished)
                {
                    this.UseWaitCursor          = false;
                    this.buttonClose.Enabled    = true;
                    this.buttonDownload.Enabled = true;
                    this.checkBoxDownloadExistingFiles.Enabled = true;
                    this.FormClosing -= PreventFormClosing;
                }
            } catch (Exception ex) {
                throw ex;
            }
        }
コード例 #3
0
 protected virtual void OnChppDownloadProgressChanged(ChppDownloadProgressChangedEventArgs eventArgs)
 {
     UpdateDownloadStatus(eventArgs);
 }