Example #1
0
 internal static void SetStyle(WizardStep step)
 {
     step.BackgroundImageLayout = ImageLayout.Stretch;
     step.ApplingTheme          = true;
     Image[] imageArray = CollectImages();
     if ((step is StartStep))
     {
         StartStep startStep = (StartStep)step;
         startStep.BindingImage = imageArray[0];
         startStep.Icon         = imageArray[3];
     }
     if ((step is IntermediateStep))
     {
         IntermediateStep intermediateStep = (IntermediateStep)step;
         intermediateStep.ForeColor    = Color.FromName("Black");
         intermediateStep.BindingImage = imageArray[2];
         intermediateStep.Icon         = imageArray[3];
     }
     if ((step is FinishStep))
     {
         FinishStep finishStep = (FinishStep)step;
         finishStep.BackgroundImage = imageArray[1];
     }
     step.ApplingTheme = false;
 }
Example #2
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);
        }
        protected internal virtual void AddFinishStep()
        {
            WizardControl wizardControl = WizardControl;

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

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

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