Example #1
0
        void WizardForm_WizardFormFinished(object sender, EventArgs e)
        {
            WizardActive = false;
            WizardForm form = sender as WizardForm;

            if (form != null)
            {
                WizardDialogResult = form.DialogResult;
            }
            _wizardFinished();
        }
Example #2
0
        private void WizardForm_WizardFormFinished(object sender, EventArgs e)
        {
            WizardActive = false;
            WizardForm form = sender as WizardForm;

            if (form != null)
            {
                WizardDialogResult = form.DialogResult;
            }
            _wizardFinished();

            if (form != null && !form.IsDisposed)
            {
                form.Dispose();
            }
        }
Example #3
0
		// 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();
		}
Example #4
0
        // 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();
        }