// if showModal is true, it will show the dialog as modal, and control will return when the // wizard has completed. If false, it will display the wizard and return, with the wizard // still open/running. The WizardActive property can be used to determine if the wizard is // still open, and the WizardForm property can be used to interact with it. Once it has // closed, the WizardDialogResult will contain the result from the dialog. public void Start(bool showModal) { _currentStageIndex = 0; if (showModal) { using (WizardForm = new WizardForm(this)) { WizardActive = true; WizardDialogResult = WizardForm.ShowDialog(); WizardActive = false; _wizardFinished(); return; } } WizardActive = true; WizardForm = new WizardForm(this); WizardForm.WizardFormFinished += WizardForm_WizardFormFinished; WizardForm.Show(); }