private void UpdateButtonsState() { AppWizardStep step = this.steps[this.stepNumber]; this.btnBack.Enabled = (this.stepNumber > 0); this.btnNext.Enabled = (this.stepNumber < this.steps.Length - 1 && step.IsValid() == true); this.btnCreate.Enabled = (this.IsValid() && this.stepNumber == this.steps.Length - 1); }
private void ShowStep(int stepNumber, int prevStepNumber = -1) { // get the current step AppWizardStep step = this.steps[stepNumber]; // if there was a previous step; get the data entered in that step // and refresh the current step if (prevStepNumber != -1) { SSOAppInfo appInfo = new SSOAppInfo(); this.steps[prevStepNumber].Update(appInfo); step.Refresh(appInfo); } this.pnlContainer.Controls.Clear(); this.pnlContainer.Controls.Add(step); // update state of navigation buttons this.UpdateButtonsState(); }