コード例 #1
0
ファイル: WizardDesigner.cs プロジェクト: Deny01/MY_PRO
        ///<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);
        }
コード例 #2
0
        protected internal virtual void AddStartStep()
        {
            IDesignerHost service = (IDesignerHost)GetService(typeof(IDesignerHost));

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

            if (WizardControl.WizardSteps.Count != 0)
            {
                WizardControl.WizardSteps.Insert(WizardControl.CurrentStepIndex, step);
                RemoveWizardFromSelection();
                SelectWizard();
                return;
            }
            else
            {
                WizardControl.WizardSteps.Add(step);
                RemoveWizardFromSelection();
                SelectWizard();
                return;
            }
        }
コード例 #3
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;
 }