/// <devdoc> /// Goes to the next panel in the wizard. /// </devdoc> public void NextPanel() { WizardPanel currentPanel = _panelHistory.Peek(); if (currentPanel.OnNext()) { currentPanel.Hide(); WizardPanel nextPanel = currentPanel.NextPanel; if (nextPanel != null) { RegisterPanel(nextPanel); _panelHistory.Push(nextPanel); OnPanelChanging(new WizardPanelChangingEventArgs(currentPanel)); ShowPanel(nextPanel); } } }
/// <devdoc> /// Click event handler for the Finish button. /// </devdoc> protected virtual void OnFinishButtonClick(object sender, System.EventArgs e) { WizardPanel currentPanel = _panelHistory.Peek(); if (currentPanel.OnNext()) { // Call OnComplete for every panel on the stack WizardPanel[] panels = _panelHistory.ToArray(); Array.Reverse(panels); foreach (WizardPanel panel in panels) { panel.OnComplete(); } DialogResult = DialogResult.OK; Close(); } }