/// <summary> /// Restarts the HelpWorkflow /// </summary> public void Start(bool force = false) { if (RootStage == null) { throw new Exception("No RootStage exists for Help, you will need to create one"); } if (!force && !ProgressProvider.ShouldShowUserWorkflow(this)) { return; } _cancellationTokenSource = new CancellationTokenSource(); _help = new TransparentHelpForm(HostControl); _help.ShowWithoutActivate(); _helpClosed = false; _help.FormClosed += (sender, args) => { _helpClosed = true; _cancellationTokenSource.Cancel(); }; ShowStage(RootStage); }
/// <summary> /// Ends the current help session (cannot be reversed) /// </summary> public void Abandon() { if (_help == null) { return; } if (HostControl.InvokeRequired) { HostControl.Invoke(new MethodInvoker(Abandon)); return; } ProgressProvider.Completed(this); _help.Close(); _help = null; }