예제 #1
0
 public WizardEventArgs(WizardStepPanel step, bool ennext, bool enprev, bool canfin)
 {
     this.step       = step;
     this.enablenext = ennext;
     this.enableprev = enprev;
     this.canfin     = canfin;
     c = false;
 }
예제 #2
0
        private void Wizard_ControlRemoved(object sender, ControlEventArgs e)
        {
            //MessageBox.Show("removing");
            if (!(e.Control is WizardStepPanel))
            {
                return;
            }
            //MessageBox.Show("doremoving");
            WizardStepPanel iws = (WizardStepPanel)e.Control;

            iws.RemoveParent(this);
            iws.Parent = null;
        }
예제 #3
0
        private void Wizard_ControlAdded(object sender, ControlEventArgs e)
        {
            //MessageBox.Show("adding");
            if (!(e.Control is WizardStepPanel))
            {
                Controls.Remove(e.Control);
                return;
            }
            //MessageBox.Show("doadd");

            WizardStepPanel iws = null;

            for (int i = Controls.Count - 1; i >= 0; i--)
            {
                Control c = Controls[i];
                if (c is WizardStepPanel)
                {
                    if (iws == null)
                    {
                        iws = (WizardStepPanel)c;
                    }
                    else
                    {
                        ((WizardStepPanel)c).Last    = false;
                        ((WizardStepPanel)c).Visible = false;
                    }
                }
            }
            if (iws == null)
            {
                return;
            }
            if (!this.DesignMode)
            {
                iws.Client.Visible = false;
            }

            iws.SetupParent(this);
            iws.Client.Parent = this.WizardContainer;
            iws.Dock          = DockStyle.Fill;
            iws.Last          = true;
            iws.First         = (Controls.Count == 0);
            iws.Visible       = true;
        }
예제 #4
0
 internal bool Contains(WizardStepPanel iws)
 {
     return(Controls.Contains(iws));
 }