SIL.FieldWorks.TE.ImportWizard.m_btnNext_Click C# (CSharp) Method

m_btnNext_Click() protected method

Handles the Click event of the m_btnNext control.
protected m_btnNext_Click ( object sender, EventArgs e ) : void
sender object The source of the event.
e System.EventArgs The instance containing the event /// data.
return void
		protected void m_btnNext_Click(object sender, EventArgs e)
		{
			if (!ValidToGoForward())
				return;

			// Hide the panel of the step we're leaving.
			panSteps[m_currentStep++].Visible = false;

			if  (m_currentStep == stepsPanel.StepText.Length)
			{
				Logger.WriteEvent("Import Wizard: Finished");
				DialogResult = DialogResult.OK;
				m_settings.SaveSettings();
				// Save the settings with the name "Default". The current default (if it's a
				// different type) will be named with the import type, i.e. "Other", "Paratext5",
				// "Paratext6".
				m_scr.DefaultImportSettings = m_settings;
				Close();
				return;
			}

			// Show the panel of the step we're switching to.
			Logger.WriteEvent("Import Wizard: Showing tab " + m_currentStep);
			panSteps[m_currentStep].Visible = true;
			UpdateStepLabel();

			// Disable the back button if on the first step.
			m_btnBack.Enabled = (m_currentStep > 0);

			m_btnNext.Text =
				(m_currentStep == stepsPanel.StepText.Length - 1 ?
			m_finishText : m_nextText);
		}