예제 #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;
 }
예제 #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);
        }
예제 #3
0
        protected internal virtual void AddCustomStep()
        {
            WizardControl wizardControl = WizardControl;

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

            if (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();
            }
        }