示例#1
0
        public void InitializeToolbox()
        {
            ToolboxXmlManager toolboxXmlManager = new ToolboxXmlManager(this);

            Tabs = toolboxXmlManager.PopulateToolboxInfo();

            ToolboxUIManagerVS toolboxUIManagerVS = new ToolboxUIManagerVS(this);

            toolboxUIManagerVS.FillToolbox();

            AddEventHandlers();
            PrintToolbox();
        }
示例#2
0
        public void AddTab(string tabName, Type[] types)
        {            
            if (Tabs == null) Tabs = new ToolboxTabCollection();
           
            ToolboxTab toolboxTab = new ToolboxTab();
            toolboxTab.Name = tabName;

            ToolboxItemCollection toolboxItems = new ToolboxItemCollection();

            for (int i = 0; i < types.Length; i++)
            {
                ToolboxItem toolboxItem = new ToolboxItem();

                toolboxItem.Type = types[i];
                toolboxItem.Name = types[i].Name;
                toolboxItems.Add(toolboxItem);
            }
            toolboxItems.SortByName();

            toolboxTab.ToolboxItems = toolboxItems;
            
            Tabs.Add(toolboxTab);

            ToolboxUIManagerVS toolboxUIManagerVS = new ToolboxUIManagerVS(this);
            toolboxUIManagerVS.FillToolbox();

            AddEventHandlers();
            //PrintToolbox();
        }