public static object ShowFinite(IMonitoredOperation monitoredOperation, string successMessage) { using (DeferredProgressBar form = new DeferredProgressBar()) { form.OperationType = OperationType.StandardProgressBar; form.MonitoredOperation = monitoredOperation; if (form.ShowDialog() == DialogResult.OK) { if (!string.IsNullOrEmpty(successMessage)) MessageBox.Show(successMessage, "Success", MessageBoxButtons.OK, MessageBoxIcon.Information); return form.SuccessObject; } else { RemoteExceptionForm.ShowFailureModal(form.FailureObject); return form.FailureObject; } } }
public static object ShowFinite(IMonitoredOperation monitoredOperation) { return ShowFinite(monitoredOperation, ""); }