/// <summary> /// Click event handler for the buttonNext object. /// </summary> /// <param name="sender">The source object of this event.</param> /// <param name="e">The event parameters.</param> private void buttonNext_Click(object sender, EventArgs e) { ++pageIndex; if (wizard == null) { InitializeWizard((Control)listViewThemes.SelectedItems[0].Tag); } else { if (pageIndex == wizard.GetPageCount() + 2) { wizard.Finish(); this.Close(); } else { if (pageIndex == wizard.GetPageCount() + 1) { buttonNext.Text = "Finish"; } wizard.SelectPage(pageIndex - 1); } } this.Text = "Create Theme: Step " + pageIndex + " of " + Convert.ToString(this.wizard.GetPageCount() + 1); buttonBack.Enabled = true; }