private void ProgressWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { progressInformationDialog.Result = (bool)e.Result; valiadated = (bool)e.Result; progressInformationDialog.UpdateProgressValue(100); progressInformationDialog.CloseDialog(); try { if (e.Error != null) { using (SccmExceptionDialog sccmExceptionDialog = new SccmExceptionDialog(e.Error)) { sccmExceptionDialog.ShowDialog(); } } } finally { if (sender as BackgroundWorker == progressWorker) { progressWorker.Dispose(); progressWorker = null; UseWaitCursor = false; } } }
private void ProgressWorker_ProgressChanged(object sender, ProgressChangedEventArgs e) { progressInformationDialog.UpdateProgressText(e.UserState as string); progressInformationDialog.UpdateProgressValue(e.ProgressPercentage); }