///<param name="defaultValues">TBD</param> public override void InitializeNewComponent(IDictionary defaultValues) { base.InitializeNewComponent(defaultValues); WizardControl control = this.Control as WizardControl; if (control == null) { return; } IDesignerHost service = (IDesignerHost)this.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); }
protected internal virtual void AddCustomStep() { IDesignerHost service = (IDesignerHost)this.GetService(typeof(IDesignerHost)); if (this.WizardControl == null || service == null) { return; } IntermediateStep step = (IntermediateStep)service.CreateComponent(typeof(IntermediateStep)); if (this.WizardControl.WizardSteps.Count != 0) { this.WizardControl.WizardSteps.Insert(this.WizardControl.CurrentStepIndex, step); this.RemoveWizardFromSelection(); this.SelectWizard(); } else { this.WizardControl.WizardSteps.Add(step); this.RemoveWizardFromSelection(); this.SelectWizard(); } }