/// <summary> /// Raises the WizardFinished event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected virtual void OnBeforeWizardFinished(object sender, WizardCancelEventArgs e) { try { if (this.BeforeWizardFinished != null) { this.BeforeWizardFinished(sender, e); } } catch (Exception ex) { Trace.WriteLine(ex); } }
/// <summary> /// Raises the finished event /// </summary> public bool FinishWizard() { /* * raise the before finished event * */ WizardCancelEventArgs ce = new WizardCancelEventArgs(this, false); this.OnBeforeWizardFinished(this, ce); // bail if the finish has been cancelled if (ce.Cancel) { // return the fact that we did NOT cancel the finish return(false); } /* * raise the finished event * */ this.OnWizardFinished(this, new WizardEventArgs(this)); // return the fact that we did finish the wizard return(true); }
/// <summary> /// Raises the finished event /// </summary> public bool FinishWizard() { /* * raise the before finished event * */ WizardCancelEventArgs ce = new WizardCancelEventArgs(this, false); this.OnBeforeWizardFinished(this, ce); // bail if the finish has been cancelled if (ce.Cancel) // return the fact that we did NOT cancel the finish return false; /* * raise the finished event * */ this.OnWizardFinished(this, new WizardEventArgs(this)); // return the fact that we did finish the wizard return true; }
/// <summary> /// Raises the WizardFinished event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected virtual void OnBeforeWizardFinished(object sender, WizardCancelEventArgs e) { try { if (this.BeforeWizardFinished != null) this.BeforeWizardFinished(sender, e); } catch(Exception ex) { Trace.WriteLine(ex); } }