Пример #1
0
        private void OnEnteringStep(bool isForwardsTransition)
        {
            WizardProgressEventArgs e = new WizardProgressEventArgs(isForwardsTransition);

            if (EnteringStep != null)
            {
                EnteringStep(this, e);
            }
        }
Пример #2
0
        /// <returns>
        /// True if the event has gone through, false if cancelled.
        /// </returns>
        private bool OnLeavingStep(bool isForwardsTransition)
        {
            WizardProgressEventArgs e = new WizardProgressEventArgs(isForwardsTransition);

            if (LeavingStep != null)
            {
                LeavingStep(this, e);
            }
            return(!e.Cancelled);
        }
Пример #3
0
        private void WizardProgress_EnteringStep(object sender, WizardProgressEventArgs e)
        {
            xenTabControlBody.SelectedTab = wizardProgress.CurrentStepTabPage;

            wizardProgress.CurrentStepTabPage.PageLoaded(e.IsForwardsTransition ? PageLoadedDirection.Forward : PageLoadedDirection.Back);
            UpdateWizard();

            if (wizardProgress.IsLastStep)
            {
                // Ensure the finish button always has focus when last page is showing.
                if (buttonNext.CanFocus)
                {
                    buttonNext.Focus();
                }
            }
        }
Пример #4
0
        private void buttonNext_Click(object sender, EventArgs e)
        {
            if (wizardProgress.IsLastStep)
            {
                var args = new WizardProgressEventArgs(true);
                WizardProgress_LeavingStep(CurrentStepTabPage, args);
                if (args.Cancelled)
                {
                    return;
                }

                wizardFinished = true;
                FinishWizard();
            }
            else
            {
                NextStep();

                // update main text from selected tab in case it was changed between substeps
                SetTitle();
            }
        }
Пример #5
0
 private void WizardProgress_LeavingStep(object sender, WizardProgressEventArgs e)
 {
     wizardProgress.CurrentStepTabPage.PageLeave(e.IsForwardsTransition ? PageLoadedDirection.Forward : PageLoadedDirection.Back, ref e.Cancelled);
     UpdateWizard();
 }
Пример #6
0
        private void WizardProgress_EnteringStep(object sender, WizardProgressEventArgs e)
        {
            xenTabControlBody.SelectedTab = wizardProgress.CurrentStepTabPage;

            wizardProgress.CurrentStepTabPage.PageLoaded(e.IsForwardsTransition ? PageLoadedDirection.Forward : PageLoadedDirection.Back);
            UpdateWizard();

            if (wizardProgress.IsLastStep)
            {
                // Ensure the finish button always has focus when last page is showing.
                if (buttonNext.CanFocus)
                    buttonNext.Focus();
            }
        }
Пример #7
0
        private void buttonNext_Click(object sender, EventArgs e)
        {
            if (wizardProgress.IsLastStep)
            {
                var args = new WizardProgressEventArgs(true);
                WizardProgress_LeavingStep(CurrentStepTabPage, args);
                if (args.Cancelled)
                    return;

                wizardFinished = true;
                WizardProgress_EnteringStep(null, new WizardProgressEventArgs(true));
                FinishWizard();
            }
            else
            {
                NextStep();

                // update main text from selected tab in case it was changed between substeps
                SetTitle();
            }
        }
Пример #8
0
 private void WizardProgress_LeavingStep(object sender, WizardProgressEventArgs e)
 {
     wizardProgress.CurrentStepTabPage.PageLeave(e.IsForwardsTransition ? PageLoadedDirection.Forward : PageLoadedDirection.Back, ref e.Cancelled);
     UpdateWizard();
 }
Пример #9
0
 /// <returns>
 /// True if the event has gone through, false if cancelled.
 /// </returns>
 private bool OnLeavingStep(bool isForwardsTransition)
 {
     WizardProgressEventArgs e = new WizardProgressEventArgs(isForwardsTransition);
     if (LeavingStep != null)
         LeavingStep(this, e);
     return !e.Cancelled;
 }
Пример #10
0
 private void OnEnteringStep(bool isForwardsTransition)
 {
     WizardProgressEventArgs e = new WizardProgressEventArgs(isForwardsTransition);
     if (EnteringStep != null)
         EnteringStep(this, e);
 }