当前位置: 首页>>代码示例>>C#>>正文


C# ToolStripItemCollection.AddRange方法代码示例

本文整理汇总了C#中System.Windows.Forms.ToolStripItemCollection.AddRange方法的典型用法代码示例。如果您正苦于以下问题:C# ToolStripItemCollection.AddRange方法的具体用法?C# ToolStripItemCollection.AddRange怎么用?C# ToolStripItemCollection.AddRange使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Forms.ToolStripItemCollection的用法示例。


在下文中一共展示了ToolStripItemCollection.AddRange方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AssignPayPalMenuItems

 private void AssignPayPalMenuItems(ToolStripItemCollection dropDownItems)
 {
     dropDownItems.AddRange(new ToolStripItem[]
     {
         donateInUSDollarsToolStripMenuItem,
         donateInEuroToolStripMenuItem,
         donateInGBPToolStripMenuItem
     });
 }
开发者ID:neronotte,项目名称:XrmToolBox,代码行数:9,代码来源:MainForm.Community.cs

示例2: ToolStrip

        public ToolStrip(ToolStripItem[] items)
        {
            _items = new ToolStripItemCollection(this, items);
            _items.AddRange(items);

            BackColor = Color.FromArgb(246, 246, 246);
            BorderColor = Color.FromArgb(204, 206, 219);
            Orientation = Forms.Orientation.Vertical;

            Owner.UpClick += Application_UpClick;
        }
开发者ID:Meragon,项目名称:Unity-WinForms,代码行数:11,代码来源:ToolStrip.cs

示例3: AddItemsToMenu

		static void AddItemsToMenu(ToolStripItemCollection collection, List<MenuItemDescriptor> descriptors)
		{
			foreach (MenuItemDescriptor descriptor in descriptors) {
				object item = CreateMenuItemFromDescriptor(descriptor);
				if (item is ToolStripItem) {
					collection.Add((ToolStripItem)item);
					if (item is IStatusUpdate)
						((IStatusUpdate)item).UpdateStatus();
				} else {
					ISubmenuBuilder submenuBuilder = (ISubmenuBuilder)item;
					collection.AddRange(submenuBuilder.BuildSubmenu(descriptor.Codon, descriptor.Caller));
				}
			}
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:14,代码来源:MenuService.cs

示例4: AddItemsToMenu

		public static void AddItemsToMenu(ToolStripItemCollection collection, object owner, string addInTreePath)
		{
			ArrayList buildItems = AddInTree.GetTreeNode(addInTreePath).BuildChildItems(owner);
			foreach (object item in buildItems) {
				if (item is ToolStripItem) {
					collection.Add((ToolStripItem)item);
					if (item is IStatusUpdate)
						((IStatusUpdate)item).UpdateStatus();
				} else {
					ISubmenuBuilder submenuBuilder = (ISubmenuBuilder)item;
					collection.AddRange(submenuBuilder.BuildSubmenu(null, owner));
				}
			}
		}
开发者ID:stophun,项目名称:fdotoolbox,代码行数:14,代码来源:MenuService.cs

示例5: AddItemsToMenu

		static void AddItemsToMenu(ToolStripItemCollection collection, IEnumerable<MenuItemDescriptor> descriptors)
		{
			foreach (MenuItemDescriptor descriptor in descriptors) {
				object item = CreateMenuItemFromDescriptor(descriptor);
				if (item is ToolStripItem) {
					collection.Add((ToolStripItem)item);
					if (item is IStatusUpdate)
						((IStatusUpdate)item).UpdateStatus();
				} else {
					IMenuItemBuilder submenuBuilder = (IMenuItemBuilder)item;
					collection.AddRange(submenuBuilder.BuildItems(descriptor.Codon, descriptor.Parameter).Cast<ToolStripItem>().ToArray());
				}
			}
		}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:14,代码来源:MenuService.cs

示例6: AddItemsToMenu

 public static void AddItemsToMenu(ToolStripItemCollection collection, object owner, string addInTreePath)
 {
     ArrayList list = AddInTree.GetTreeNode(addInTreePath).BuildChildItems(owner);
     foreach (object obj2 in list)
     {
         if (obj2 is ToolStripItem)
         {
             collection.Add((ToolStripItem) obj2);
             if (obj2 is IStatusUpdate)
             {
                 ((IStatusUpdate) obj2).UpdateStatus();
             }
         }
         else
         {
             ISubmenuBuilder builder = (ISubmenuBuilder) obj2;
             collection.AddRange(builder.BuildSubmenu(null, owner));
         }
     }
 }
开发者ID:vanloc0301,项目名称:mychongchong,代码行数:20,代码来源:MenuService.cs

示例7: AssignHelpMenuItems

 private void AssignHelpMenuItems(ToolStripItemCollection dropDownItems)
 {
     dropDownItems.AddRange(new ToolStripItem[] {
         displayXrmToolBoxHelpToolStripMenuItem});
 }
开发者ID:neronotte,项目名称:XrmToolBox,代码行数:5,代码来源:MainForm.Community.cs

示例8: AssignCodePlexMenuItems

 private void AssignCodePlexMenuItems(ToolStripItemCollection dropDownItems)
 {
     dropDownItems.AddRange(new ToolStripItem[] {
         startADiscussionToolStripMenuItem});
 }
开发者ID:neronotte,项目名称:XrmToolBox,代码行数:5,代码来源:MainForm.Community.cs

示例9: getSessionMenuItems

        /// <summary>
        /// Add the array of menu items to the system tray
        /// </summary>
        /// <param name="cms">The menu</param>
        /// <param name="parent">The root of the systray menu</param>
        public override void getSessionMenuItems(ContextMenuStrip cms, ToolStripItemCollection parent)
        {
            // Suspend the layout before modification
            cms.SuspendLayout();

            parent.Clear();

            // Setup the System tray array of menu items
            ToolStripMenuItem[] tsmiArray = new ToolStripMenuItem[getSessionController().getSessionList().Count];
            int i = 0;
            foreach (Session s in getSessionController().getSessionList())
            {
                tsmiArray[i] = new ToolStripMenuItem(s.SessionDisplayText, null, listBox1_DoubleClick);
                // Make sure the menu item is tagged with the session
                tsmiArray[i].Tag = s;
                i++;
            }

            if ( tsmiArray != null )
                parent.AddRange(tsmiArray);

            // Now resume the layout
            cms.ResumeLayout();
        }
开发者ID:verbitan,项目名称:PuTTY-Session-Manager,代码行数:29,代码来源:SessionListControl.cs

示例10: SortItems

        public void SortItems(ToolStripItemCollection items)
        {
            if(items == null)
                throw new ArgumentNullException("items");

            ArrayList list = new ArrayList();
            foreach(object o in items)
                list.Add(o);

            list.Sort(new ToolStripCustomIComparer());

            items.Clear();
            items.AddRange((ToolStripItem[])list.ToArray(typeof(ToolStripItem)));
        }
开发者ID:cyotek,项目名称:translateclient,代码行数:14,代码来源:BaseGUIForm.cs

示例11: MoveToolStripItems

 private static void MoveToolStripItems(ToolStripItemCollection from, ToolStripItemCollection to)
 {
     ToolStripItem[] arr = new ToolStripItem[from.Count];
     from.CopyTo(arr, 0);
     to.AddRange(arr);
 }
开发者ID:liddictm,项目名称:BrawlManagers,代码行数:6,代码来源:MainForm.cs


注:本文中的System.Windows.Forms.ToolStripItemCollection.AddRange方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。