Example #1
0
 public void AddRange(DesignerContainerTabCollection value)
 {
     for (int i = 0; (i < value.Count); i = (i + 1))
     {
         this.Add(value[i]);
     }
 }
Example #2
0
        private DesignerContainerTabCollection PopulateToolboxTabs()
        {
            DesignerContainerTabCollection toolboxTabs = new DesignerContainerTabCollection();

            string[] tabNames = { Strings.UserControls, Strings.WindowsForms, Strings.Components, Strings.Data };

            for (int i = 0; i < tabNames.Length; i++)
            {
                if (i > 1)
                {
                    break;
                }
                DesignerContainerTab toolboxTab = new DesignerContainerTab();

                toolboxTab.Name = tabNames[i];
                PopulateDesignerContainerItems(toolboxTab);
                toolboxTabs.Add(toolboxTab);
            }

            return(toolboxTabs);
        }
Example #3
0
        private DesignerContainerTabCollection PopulateToolboxTabs(XmlDocument xmlDocument)
        {
            if (xmlDocument == null)
            {
                return(null);
            }

            XmlNode toolboxNode = xmlDocument.FirstChild;

            if (toolboxNode == null)
            {
                return(null);
            }

            XmlNode tabCollectionNode = toolboxNode.FirstChild;

            if (tabCollectionNode == null)
            {
                return(null);
            }

            XmlNodeList tabsNodeList = tabCollectionNode.ChildNodes;

            if (tabsNodeList == null)
            {
                return(null);
            }

            DesignerContainerTabCollection toolboxTabs = new DesignerContainerTabCollection();

            foreach (XmlNode tabNode in tabsNodeList)
            {
                if (tabNode == null)
                {
                    continue;
                }

                XmlNode propertiesNode = tabNode.FirstChild;
                if (propertiesNode == null)
                {
                    continue;
                }

                XmlNode nameNode = propertiesNode[Strings.Name];
                if (nameNode == null)
                {
                    continue;
                }

                DesignerContainerTab DesignerContainerTab = new DesignerContainerTab();
                DesignerContainerTab.Name = nameNode.InnerXml.ToString();
                PopulateDesignerContainerItems(tabNode, DesignerContainerTab);
                toolboxTabs.Add(DesignerContainerTab);
            }
            if (toolboxTabs.Count == 0)
            {
                return(null);
            }

            return(toolboxTabs);
        }
Example #4
0
 public ToolboxTabEnumerator(DesignerContainerTabCollection mappings)
 {
     this.temp           = ((IEnumerable)(mappings));
     this.baseEnumerator = temp.GetEnumerator();
 }
Example #5
0
 public DesignerContainerTabCollection(DesignerContainerTabCollection value)
 {
     this.AddRange(value);
 }