public virtual void Initialize(string title, WizardStepBase previousStep, WizardStepBase nextStep) { this.Title = title; this.PrevStep = previousStep; this.NextStep = nextStep; btnNextStep.Enabled = (this.NextStep != null); btnPrevStep.Enabled = (this.PrevStep != null); }
protected void Show(Control parentControl, WizardStepBase controlBeingShown) { if (controlBeingShown != null) { this.ParentControl = parentControl; if (this.ParentControl != null) { var controls = this.ParentControl.Controls; Control newActiveControl = null; for (int i = 0; i < this.ParentControl.Controls.Count; i++) { var ctl = this.ParentControl.Controls[i]; try { ctl.Hide(); } catch { } if (ctl.GetType() == typeof(WizardStepBase) && (ctl as WizardStepBase).Title == controlBeingShown.Title) { newActiveControl = ctl; } } if (newActiveControl == null) { try { controlBeingShown.Dock = DockStyle.Fill; } catch { } this.ParentControl.Controls.Add(controlBeingShown); } controlBeingShown.Show(); Application.DoEvents(); } } }
public Step3(Step2 prevStep) { this.InitializeComponent(); base.Initialize(TITOLO, prevStep, WizardStepBase.CreateEmptyWizardStep()); }