//-------------------------------------------------------------------------------- /// <summary> /// Fired when the Next button is clicked /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void buttonNext_Click(object sender, EventArgs e) { // if the current page (before changing) is the last page in the wizard, // take steps to close the wizard if (PageChain.GetCurrentPage().WizardPageType == WizardPageType.Stop) { // call the central SaveData method (which calls the SaveData // method in each page in the chain if (PageChain.SaveData() == null) { // and if everything is okay, close the wizard form this.Close(); } } // otherwise, move to the next page in the chain, and let the base class know else { WizardPage nextpage = PageChain.GetCurrentPage().GetNextPage(); if (nextpage != null) { WizardPage currentPage = PageChain.GoNext(nextpage); Raise_WizardPageChangeEvent(new WizardPageChangeArgs(currentPage, WizardStepType.Next)); } } }
//-------------------------------------------------------------------------------- /// <summary> /// Fired when the Next button is clicked /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void buttonNext_Click(object sender, EventArgs e) { // if the current page (before changing) is the last page in the wizard, // take steps to close the wizard //WizardPage a = PageChain.GetCurrentPage(); clsGlobalVariables.WizardPagePrevious = PageChain.GetCurrentPage().Name; if (PageChain.GetCurrentPage().WizardPageType == WizardPageType.Stop) { // call the central SaveData method (which calls the SaveData // method in each page in the chain if (PageChain.SaveData() == null) { // and if everything is okay, close the wizard form clsGlobalVariables.Browsed = false; this.Close(); } } // otherwise, move to the next page in the chain, and let the base class know else { WizardPage currentPage = PageChain.GoNext(PageChain.GetCurrentPage().GetNextPage()); clsGlobalVariables.WizardPageCurrent = currentPage.Name; if (currentPage.Name == "WizardPageCamera") { WizardPageCamera.ConnectUSBCamera(); } if (currentPage.Name == "WizardPageEditor") { WizardPageCamera.DisconnectUSBCamera(); } if (currentPage.Name == "WizardPageUSBBrowser") { clsGlobalVariables.USBBrowserShow = true; } if (currentPage.Name == "WizardPagePrintSummary") { //WizardPagePrintSummary a = new WizardPagePrintSummary(); //a.loadFilesToPrint(); clsGlobalVariables.SummaryPageAccess = true; } Raise_WizardPageChangeEvent(new WizardPageChangeArgs(currentPage, WizardStepType.Next)); } }