Пример #1
0
        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;
                }
            }
        }
Пример #2
0
 public static object ShowFinite(IMonitoredOperation monitoredOperation)
 {
     return ShowFinite(monitoredOperation, "");
 }