Esempio n. 1
0
        private void OnEnteringStep(bool isForwardsTransition)
        {
            WizardProgressEventArgs e = new WizardProgressEventArgs(isForwardsTransition);

            if (EnteringStep != null)
            {
                EnteringStep(this, e);
            }
        }
Esempio n. 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);
        }
Esempio n. 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();
                }
            }
        }
Esempio n. 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();
            }
        }
Esempio n. 5
0
 private void WizardProgress_LeavingStep(object sender, WizardProgressEventArgs e)
 {
     wizardProgress.CurrentStepTabPage.PageLeave(e.IsForwardsTransition ? PageLoadedDirection.Forward : PageLoadedDirection.Back, ref e.Cancelled);
     UpdateWizard();
 }
Esempio n. 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();
            }
        }
Esempio n. 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();
            }
        }
Esempio n. 8
0
 private void WizardProgress_LeavingStep(object sender, WizardProgressEventArgs e)
 {
     wizardProgress.CurrentStepTabPage.PageLeave(e.IsForwardsTransition ? PageLoadedDirection.Forward : PageLoadedDirection.Back, ref e.Cancelled);
     UpdateWizard();
 }
Esempio n. 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;
 }
Esempio n. 10
0
 private void OnEnteringStep(bool isForwardsTransition)
 {
     WizardProgressEventArgs e = new WizardProgressEventArgs(isForwardsTransition);
     if (EnteringStep != null)
         EnteringStep(this, e);
 }