protected void Completed(bool isAborted, bool closeDialog, string message) { if (_stopped) { return; } _stopped = true; OnStopped(); // pending UI tasks have to be processed before the dialog is closed. DoUIEvents(); if (isAborted) { _site.Cancel(message); } else { if (message != null) { _site.MainWindow.Information(message); } _site.Complete(); } if (closeDialog) { _dialog.AsyncClose(); } else { _dialog.AsyncReset(); } Dispose(); }
protected void Fail(string msg) { _parent.AsyncClose(); _site.Cancel(msg); Dispose(); }