private void UploadExaminationFile() { worker = new BackgroundWorker() { WorkerReportsProgress = true, WorkerSupportsCancellation = true, }; worker.DoWork += new DoWorkEventHandler(UploadExaminationFileDoWork); worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(UploadExaminationCompleted); worker.ProgressChanged += new ProgressChangedEventHandler(UploadExaminationProgressChanged); progress = new ProgressForm(); progress.SetTitle = CaptionHelper.GetLocalizedText("CustomFomrsMessages", "ImportExamProgress"); progress.CancelButtonClick += new EventHandler<EventArgs>(UploadExaminationCancelButtonClick); worker.RunWorkerAsync(); progress.Show(); }
private void UploadFile() { worker = new BackgroundWorker() { WorkerReportsProgress = true, WorkerSupportsCancellation = true, }; worker.DoWork += new DoWorkEventHandler(UploadFileDoWork); worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(UploadFileCompleted); worker.ProgressChanged += new ProgressChangedEventHandler(TransferFileProgressChanged); progress = new ProgressForm(); progress.SetTitle = CaptionHelper.GetLocalizedText("FileAttachments", "UploadingFile"); progress.CancelButtonClick += new EventHandler<EventArgs>(TransferFileCancelButtonClick); worker.RunWorkerAsync(); progress.Show(); }
private void FillRtfTemplate(string conclutionFileName, Dictionary<string, string> dictionary) { worker = new BackgroundWorker() { WorkerReportsProgress = true, WorkerSupportsCancellation = true }; worker.DoWork += new DoWorkEventHandler(worker_DoWork); worker.ProgressChanged += new ProgressChangedEventHandler(worker_ProgressChanged); worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(worker_RunWorkerCompleted); progress = new ProgressForm(); progress.CancelButtonClick += new EventHandler<EventArgs>(this.CancelButtonClick); progress.SetTitle = CaptionHelper.GetLocalizedText("Captions", "FillRtfTemplateProgressFormTitle"); worker.RunWorkerAsync(new object[] { conclutionFileName, dictionary }); progress.Show(); }