ICollection IComponentDiscoveryService.GetComponentTypes(IDesignerHost designerHost, System.Type baseType) { Hashtable hashtable = new Hashtable(); ToolboxItemCollection toolboxItems = ((IToolboxService)this).GetToolboxItems(); if (toolboxItems != null) { System.Type type = typeof(IComponent); TypeDescriptionProviderService service = null; TypeDescriptionProvider provider = null; if (designerHost != null) { service = designerHost.GetService(typeof(TypeDescriptionProviderService)) as TypeDescriptionProviderService; } foreach (ToolboxItem item in toolboxItems) { System.Type c = item.GetType(designerHost); if (((c != null) && type.IsAssignableFrom(c)) && ((baseType == null) || baseType.IsAssignableFrom(c))) { if (service != null) { provider = service.GetProvider(c); if ((provider != null) && !provider.IsSupportedType(c)) { continue; } } hashtable[c] = c; } } } return(hashtable.Values); }
/// <summary> /// Initializes a new instance of <see cref='System.Drawing.Design.ToolboxItemCollection'/> based on another <see cref='System.Drawing.Design.ToolboxItemCollection'/>. /// </summary> public ToolboxItemCollection(ToolboxItemCollection value) { InnerList.AddRange(value); }
/// <include file='doc\ToolboxItemCollection.uex' path='docs/doc[@for="ToolboxItemCollection.ToolboxItemCollection"]/*' /> /// <devdoc> /// <para> /// Initializes a new instance of <see cref='System.Drawing.Design.ToolboxItemCollection'/> based on another <see cref='System.Drawing.Design.ToolboxItemCollection'/>. /// </para> /// </devdoc> public ToolboxItemCollection(ToolboxItemCollection value) { InnerList.AddRange(value); }
public ToolboxItemCollection(ToolboxItemCollection value) { throw null; }
public FormsToolBoxService(FormsToolBoxBuilder builder) { _toolBoxItems = builder.CollectItemsFromAssembly(typeof(Form).Assembly); }
/// <summary> /// Initializes a new instance of <see cref='System.Drawing.Design.ToolboxItemCollection'/> based on another <see cref='System.Drawing.Design.ToolboxItemCollection'/>. /// </summary> public ToolboxItemCollection(ToolboxItemCollection value) => throw new NotImplementedException(SR.NotImplementedByDesign);
//--------------------------------------------------------------------------- private void WinForm_DesignerNavigator_Load(object sender, System.EventArgs e) { SkinRefresh(); ViewBaseClass = false; try{ toolboxItemCollection = OtaUtils.GetToolboxService().GetToolboxItems(); imageList_TOOLPALETTE.Images.Clear(); Icon ico = Lextm.ArtCSB.ArtCSB_MyResource.UnknownImage16x16_ico;//((Icon)(Common.MyRes.GetObject("UnknownImage16x16.ico"))); imageList_TOOLPALETTE.Images.Add(ico); for (int i = 0; i < toolboxItemCollection.Count; i++){ imageList_TOOLPALETTE.Images.Add(toolboxItemCollection[i].Bitmap); } this.ShowInTaskbar = (bool)PropertyRegistry.Get("DesignerNavigator_ShowInTaskBar", true); //if (RefreshFileName != Utils_OTAPI.CurrentEditorFileName){ SkinRefresh(); MyTreeRefresh(); SelectionRefresh(); //} }catch{ LoggingService.Error("ArtCSB: Fails to load icons for controls."); } }