Ejemplo n.º 1
0
        private void buttonNext_Click(object sender, EventArgs e)
        {
            if (CurrentPage != null)
            {
                IWizardPage nextPage;
                try
                {
                    nextPage = CurrentPage.Next();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(this, $"Error:\n{ex.Message}", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }

                if (nextPage != null)
                {
                    SetPage(nextPage);
                }
                else
                {
                    MessageBox.Show("Complete.");
                    Close();
                }
            }
        }