private void nextButton_Click(object sender, EventArgs e) { SectionHolder holder = wizardPages[visiblePageIndex] as SectionHolder; if (holder != null) { holder.Section.SaveSettings(); } if (visiblePageIndex == wizardPages.Count - 1) { // // This was the last page, finish off the wizard // SaveSectionSettings(); Close(); } else { // // Show the next page of the wizard // ShowNextPage(); } }
private void ShowPreviousPage() { // // Make sure we have something to show // while (true) { if (visiblePageIndex - 1 >= 0) { // // Move to previous index // visiblePageIndex--; // // Activate section // SectionHolder holder = wizardPages[visiblePageIndex] as SectionHolder; if (holder != null) { // // Evaluate if this section should be shown at all // if (EvaluateExpression(holder.Expression)) { ActivateSection(holder.Section); // // Set topic and information // SetTopic(holder.Topic); SetInformation(holder.Information); break; } } } else { // // No more pages to show // break; } } // // Update control status // UpdateControlStatus(); }