private void bkgBugDetails_ProgressChanged(object sender, ProgressChangedEventArgs e) { BackgroundWorker bkgWork = sender as BackgroundWorker; string strMessage = string.Format(Messages.LoadBugDetails, this.bugId); switch (e.ProgressPercentage) { case 0: _asyncOpManager.BeginOperation(bkgWork, strMessage, e.ProgressPercentage); break; case 100: _asyncOpManager.UpdateStatus(bkgWork, Messages.EndOperation, e.ProgressPercentage); break; default: _asyncOpManager.UpdateStatus(bkgWork, strMessage, e.ProgressPercentage); break; } }
void bkgAddBug_ProgressChanged(object sender, ProgressChangedEventArgs e) { BackgroundWorker bkgWork = sender as BackgroundWorker; switch (e.ProgressPercentage) { case 0: asyncOpManager.BeginOperation(bkgWork, Messages.AddBugInProgress, e.ProgressPercentage); break; case 100: asyncOpManager.UpdateStatus(bkgWork, Messages.EndOperation, e.ProgressPercentage); break; default: asyncOpManager.UpdateStatus(bkgWork, Messages.AddBugInProgress, e.ProgressPercentage); break; } }
private void bwLoadCatalogues_ProgressChanged(object sender, ProgressChangedEventArgs e) { BackgroundWorker backgroundWorker = sender as BackgroundWorker; switch (e.ProgressPercentage) { case 0: if (_asyncOpManager != null) { _asyncOpManager.BeginOperation(backgroundWorker, Messages.LoadCataloguesInProgress, e.ProgressPercentage); } break; case 100: if (_asyncOpManager != null) { _asyncOpManager.UpdateStatus(backgroundWorker, Messages.LoadCataloguesInProgress, e.ProgressPercentage); } break; default: if (_asyncOpManager != null) { _asyncOpManager.UpdateStatus(backgroundWorker, Messages.LoadCataloguesInProgress, e.ProgressPercentage); } break; } }
private void bkgTestCredentials_ProgressChanged(object sender, ProgressChangedEventArgs e) { BackgroundWorker bkgWork = sender as BackgroundWorker; switch (e.ProgressPercentage) { case 0: //statusStrip1.Visible = true; pbStatus.Visible = true; lblStatusInfo.Visible = true; _asyncOpManager.BeginOperation(bkgWork, Messages.TestCredentials, e.ProgressPercentage); break; case 100: //statusStrip1.Visible = false; pbStatus.Visible = false; lblStatusInfo.Visible = false; _asyncOpManager.UpdateStatus(bkgWork, Messages.EndOperation, e.ProgressPercentage); break; default: _asyncOpManager.UpdateStatus(bkgWork, Messages.TestCredentials, e.ProgressPercentage); lblStatusInfo.Text = Messages.TestCredentials; pbStatus.ProgressBar.Value = e.ProgressPercentage; break; } }