Beispiel #1
0
 ///  <summary>
 ///
 ///       Adds the contents of another <see cref="ToolboxLibrary.ToolboxItemCollection"/> to the end of the collection.
 ///
 ///  </summary>
 ///  <param name="value">
 ///    A <see cref="ToolboxLibrary.ToolboxItemCollection"/> containing the objects to add to the collection.
 ///  </param>
 ///  <remarks><seealso cref="ToolboxLibrary.ToolboxItemCollection.Add"/></remarks>
 ///  <history>
 ///      [dineshc] 3/26/2003  Created
 ///  </history>
 public void AddRange(ToolboxItemCollection value)
 {
     for (int i = 0; (i < value.Count); i = (i + 1))
     {
         this.Add(value[i]);
     }
 }
Beispiel #2
0
        private void PopulateToolboxItems(ToolboxTab toolboxTab)
        {
            if (toolboxTab == null)
            {
                return;
            }

            Type[] typeArray = null;

            switch (toolboxTab.Name)
            {
            case Strings.WindowsForms:
                typeArray = windowsFormsToolTypes;
                break;

            case Strings.Components:
                typeArray = componentsToolTypes;
                break;

            case Strings.Data:
                typeArray = dataToolTypes;
                break;

            case Strings.UserControls:
                typeArray = userControlsToolTypes;
                break;

            default:
                break;
            }

            ToolboxItemCollection toolboxItems = new ToolboxItemCollection();

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

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

            toolboxTab.ToolboxItems = toolboxItems;
        }
Beispiel #3
0
 ///  <summary>
 ///       Initializes a new instance of <see cref="ToolboxLibrary.ToolboxItemCollection"/> based on another <see cref="ToolboxLibrary.ToolboxItemCollection"/>.
 ///  </summary>
 ///  <param name="value">
 ///       A <see cref="ToolboxLibrary.ToolboxItemCollection"/> from which the contents are copied
 ///  </param>
 ///  <remarks></remarks>
 ///  <history>
 ///      [dineshc] 3/26/2003  Created
 ///  </history>
 public ToolboxItemCollection(ToolboxItemCollection value)
 {
     this.AddRange(value);
 }
Beispiel #4
0
 public ToolboxItemEnumerator(ToolboxItemCollection mappings)
 {
     this.temp           = ((IEnumerable)(mappings));
     this.baseEnumerator = temp.GetEnumerator();
 }