Beispiel #1
0
        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);
        }
Beispiel #2
0
        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();
                }
            }
        }
Beispiel #3
0
 public Step3(Step2 prevStep)
 {
     this.InitializeComponent();
     base.Initialize(TITOLO, prevStep, WizardStepBase.CreateEmptyWizardStep());
 }