Exemplo n.º 1
0
 private void SelectWizard(WizardControl wizardControl, IDesignerHost host)
 {
     if (wizardControl == null)
     {
         return;
     }
     if (host == null)
     {
         return;
     }
     while (true)
     {
         WizardDesigner designer = (WizardDesigner)host.GetDesigner(wizardControl);
         if (designer == null)
         {
             return;
         }
         ISelectionService service = (ISelectionService)host.GetService(typeof(ISelectionService));
         if (service == null)
         {
             return;
         }
         object[] components = new object[] { wizardControl };
         service.SetSelectedComponents(components, SelectionTypes.Replace);
         return;
     }
 }
Exemplo n.º 2
0
 protected override void OnHandleCreated(EventArgs e)
 {
     base.OnHandleCreated(e);
     if (ApplingTheme)
     {
         return;
     }
     if (DesignMode)
     {
         PropertyDescriptor descriptor = TypeDescriptor.GetProperties(WizardControl)["Theme"];
         if (descriptor == null)
         {
             return;
         }
         WizardDesigner.SetStyle(this);
         return;
     }
 }