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