public void ShowProgress(IProgressExCallback TaskWithProgress) { _lastException = null; Canceled = false; Task.Factory.StartNew(() => { try { TaskWithProgress(); } catch (Exception ex) { _lastException = ex; } }).ContinueWith(t => { _syncContext.Send(s => { Hide(); }, null); }); _syncContext.Send(s => { cancelButton.Enabled = _cancelable; ControlBox = _cancelable; ShowDialog(_ownerForm); }, null); if (_lastException != null) { throw _lastException; } }
public void ShowProgress(IProgressExCallback TaskWithProgress) { throw new NotImplementedException(); }