Esempio n. 1
0
        ///<param name="defaultValues">TBD</param>
        public override void InitializeNewComponent(IDictionary defaultValues)
        {
            base.InitializeNewComponent(defaultValues);
            WizardControl control = Control as WizardControl;

            if (control == null)
            {
                return;
            }
            IDesignerHost service = (IDesignerHost)GetService(typeof(IDesignerHost));

            if (service == null)
            {
                return;
            }
            StartStep step = (StartStep)service.CreateComponent(typeof(StartStep));

            control.WizardSteps.Add(step);
            LicenceStep licStep = (LicenceStep)service.CreateComponent(typeof(LicenceStep));

            control.WizardSteps.Add(licStep);
            IntermediateStep step2 = (IntermediateStep)service.CreateComponent(typeof(IntermediateStep));

            control.WizardSteps.Add(step2);
            FinishStep step3 = (FinishStep)service.CreateComponent(typeof(FinishStep));

            control.WizardSteps.Add(step3);
        }
Esempio n. 2
0
        protected internal virtual void AddCustomStep()
        {
            IDesignerHost service = (IDesignerHost)GetService(typeof(IDesignerHost));

            if (WizardControl == null || service == null)
            {
                return;
            }
            IntermediateStep step = (IntermediateStep)service.CreateComponent(typeof(IntermediateStep));

            if (WizardControl.WizardSteps.Count != 0)
            {
                WizardControl.WizardSteps.Insert(WizardControl.CurrentStepIndex, step);
                RemoveWizardFromSelection();
                SelectWizard();
            }
            else
            {
                WizardControl.WizardSteps.Add(step);
                RemoveWizardFromSelection();
                SelectWizard();
            }
        }