/// <summary> /// Event handler for cancel clicked event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void cancel_Click(object sender, EventArgs e) { if (this.currentIndex == this.MaxPages - 1) { this.cancel.Text = TrayApp.Properties.Resources.finishText; WizardButtons = KeyRecoveryWizardButtons.Cancel; } this.Close(); this.Dispose(); }
private void next_Click(object sender, System.EventArgs e) { int nextIndex = this.pages[currentIndex].ValidatePage(currentIndex); if (nextIndex == -999) { this.Close(); this.Dispose(); return; } if (nextIndex != currentIndex) { this.pages[currentIndex].DeactivatePage(); this.pages[nextIndex].ActivatePage(currentIndex); currentIndex = nextIndex; } if (this.currentIndex == this.MaxPages - 1 || this.currentIndex == this.MaxPages - 3) { this.cancel.Text = TrayApp.Properties.Resources.finishText; next.DialogResult = DialogResult.OK; WizardButtons = KeyRecoveryWizardButtons.Cancel; } }
private void cancel_Click(object sender, EventArgs e) { if (this.currentIndex == this.MaxPages - 1) { this.cancel.Text = TrayApp.Properties.Resources.finishText; WizardButtons = KeyRecoveryWizardButtons.Cancel; } this.Close(); this.Dispose(); }
private void back_Click(object sender, System.EventArgs e) { this.WizardButtons = KeyRecoveryWizardButtons.Next | KeyRecoveryWizardButtons.Back | KeyRecoveryWizardButtons.Cancel; int previousIndex = this.pages[currentIndex].DeactivatePage(); this.pages[previousIndex].ActivatePage(0); currentIndex = previousIndex; }