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


C# Forms.ToolStripDropDownItem类代码示例

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


ToolStripDropDownItem类属于System.Windows.Forms命名空间,在下文中一共展示了ToolStripDropDownItem类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: maakHelpMenu

 private void maakHelpMenu()
 {
     ToolStripDropDownItem menu;
     menu = new ToolStripMenuItem("Help");
     menu.DropDownItems.Add("Over \"Schets\"", null, this.about);
     menuStrip.Items.Add(menu);
 }
开发者ID:Dylrak,项目名称:SchetsEditor,代码行数:7,代码来源:Hoofdscherm.cs

示例2: ToolStripDropDownItemProvider

		public ToolStripDropDownItemProvider (ToolStripDropDownItem dropDrownItem) :
			base (dropDrownItem)
		{
			this.dropDrownItem = dropDrownItem;
			itemProviders = new Dictionary<ToolStripItem, FragmentControlProvider> ();
			
		}
开发者ID:mono,项目名称:uia2atk,代码行数:7,代码来源:ToolStripDropDownItemProvider.cs

示例3: DynamicMenu

        // Constructor required by plugins
        public DynamicMenu(ToolStripDropDownItem tsmiHost)
        {
            Debug.Assert(tsmiHost != null);
            if(tsmiHost == null) throw new ArgumentNullException("tsmiHost");

            m_tsicHost = tsmiHost.DropDownItems;
        }
开发者ID:haro-freezd,项目名称:KeePass,代码行数:8,代码来源:DynamicMenu.cs

示例4: CreateGroupItems

 public static List<ToolStripItem> CreateGroupItems(ToolStripDropDownItem dropDownItem)
 {
     List<ToolStripItem> ret = new List<ToolStripItem>();
     DropDownMenuReorderable dropDown = null;
     if(dropDownItem != null) {
         dropDown = (DropDownMenuReorderable)dropDownItem.DropDown;
         while(dropDown.Items.Count > 0) {
             dropDown.Items[0].Dispose();
         }
         dropDown.ItemsClear();
     }
     const string key = "groups";
     foreach(Group group in GroupsManager.Groups) {
         if(group.Paths.Count == 0 || !QTUtility2.PathExists(group.Paths[0])) continue;
         QMenuItem item = new QMenuItem(group.Name, MenuGenre.Group);
         item.SetImageReservationKey(group.Paths[0], null);
         if(dropDown != null) {
             dropDown.AddItem(item, key);
         }
         ret.Add(item);
         if(!group.Startup) continue;
         if(StartUpTabFont == null) {
             StartUpTabFont = new Font(item.Font, FontStyle.Underline);
         }
         item.Font = StartUpTabFont;
     }
     if(dropDownItem != null) {
         dropDownItem.Enabled = dropDown.Items.Count > 0;
     }
     return ret;
 }
开发者ID:Nicologies,项目名称:QTTabBar,代码行数:31,代码来源:MenuUtility.cs

示例5: AddSubMenuNodes

 private void AddSubMenuNodes(IEnumerable<ConnectionInfo> nodes, ToolStripDropDownItem toolStripMenuItem)
 {
     foreach (var connectionInfo in nodes)
     {
         var newItem = CreateMenuItem(connectionInfo);
         toolStripMenuItem.DropDownItems.Add(newItem);
     }
 }
开发者ID:mRemoteNG,项目名称:mRemoteNG,代码行数:8,代码来源:ConnectionsTreeToMenuItemsConverter.cs

示例6: Endisable

		private static void Endisable(ToolStripDropDownItem tsddi, bool enable, PropagationMode mode) {
			
			if((mode & PropagationMode.CHILDREN) == PropagationMode.CHILDREN) {
				foreach(ToolStripItem tsi in tsddi.DropDownItems) {
					Endisable(tsi, enable, PropagationMode.CHILDREN);
				}
			}
			tsddi.Enabled = enable;
		}
开发者ID:logtcn,项目名称:greenshot,代码行数:9,代码来源:ToolStripItemEndisabler.cs

示例7: HookItem

 private void HookItem(ToolStripDropDownItem t)
 {
     t.Click += SubHook;
     t.Tag = this;
     if (!t.HasDropDownItems) return;
     foreach (ToolStripMenuItem item in t.DropDownItems)
     {
         HookItem(item);
     }
 }
开发者ID:drzo,项目名称:opensim4opencog,代码行数:10,代码来源:AspectContextAction.cs

示例8: OpenWithMenu

        public OpenWithMenu(ToolStripDropDownItem tsmiHost)
        {
            if(tsmiHost == null) { Debug.Assert(false); return; }

            m_tsmiHost = tsmiHost;
            m_dynMenu = new DynamicMenu(m_tsmiHost);
            m_dynMenu.MenuClick += this.OnOpenUrl;

            m_tsmiHost.DropDownOpening += this.OnMenuOpening;
        }
开发者ID:earthday,项目名称:keepass2,代码行数:10,代码来源:OpenWithMenu.cs

示例9: AddBodyGlyphs

 private void AddBodyGlyphs(ToolStripDropDownItem item)
 {
     if ((item != null) && (((ToolStripMenuItemDesigner) this.designerHost.GetDesigner(item)) != null))
     {
         foreach (ToolStripItem item2 in item.DropDownItems)
         {
             this.AddItemBodyGlyph(item2);
         }
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:10,代码来源:ToolStripMenuItemDesigner.cs

示例10: UpdateDropDownText

 protected void UpdateDropDownText(ToolStripDropDownItem dropDownItem, object ItemTag)
 {
     foreach (ToolStripItem item in dropDownItem.DropDownItems)
     {
         if (ItemTag.Equals(item.Tag))
         {
             dropDownItem.Text = item.Text;
             break;
         }
     }
 }
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:11,代码来源:CustomFilterControl.cs

示例11: PerformDropDownClick

 protected static void PerformDropDownClick(ToolStripDropDownItem dropDownItem, object ItemTag)
 {
     foreach (ToolStripItem item in dropDownItem.DropDownItems)
     {
         if (ItemTag.Equals(item.Tag))
         {
             item.PerformClick();
             break;
         }
     }
 }
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:11,代码来源:CustomFilterControl.cs

示例12: MruController

 public MruController(string subKeyName, ToolStripDropDownItem recentMenu, EventHandler onItemClick)
 {
     if (string.IsNullOrWhiteSpace(subKeyName))
         throw new ArgumentNullException("subKeyName");
     if (recentMenu == null)
         throw new ArgumentNullException("parentMenuItem");
     if (onItemClick == null)
         throw new ArgumentNullException("onItemClick");
     SubKeyName = string.Concat(@"Software\", subKeyName);
     RecentMenu = recentMenu;
     OnItemClick = onItemClick;
     RefreshRecentMenu();
 }
开发者ID:dogbiscuituk,项目名称:TagScanner32767,代码行数:13,代码来源:MruController.cs

示例13: CheckDropDownBounds

 private bool CheckDropDownBounds(ToolStripDropDownItem dropDownItem, Glyph childGlyph, GlyphCollection glyphs)
 {
     if (dropDownItem == null)
     {
         return false;
     }
     Rectangle bounds = childGlyph.Bounds;
     Rectangle rect = base.BehaviorService.ControlRectInAdornerWindow(dropDownItem.DropDown);
     if (!bounds.IntersectsWith(rect))
     {
         glyphs.Insert(0, childGlyph);
     }
     return true;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:14,代码来源:ToolStripContainerDesigner.cs

示例14: RecursiveMenuItems

		private void RecursiveMenuItems(ToolStripDropDownItem item)
		{
			if (item.HasDropDownItems)
			{
				foreach (var cItem in item.DropDownItems)
				{
					if (cItem is ToolStripMenuItem)
					{
						RecursiveMenuItems((ToolStripMenuItem)cItem);
					}
				}
			}

			SetColorsOnMenuItem((ToolStripMenuItem)item);
		}
开发者ID:Heitx,项目名称:Starbounder,代码行数:15,代码来源:FormMain.cs

示例15: GetAllDbData

 internal static void GetAllDbData(ToolStripDropDownItem toolStripMenu)
 {
     using (UPdatabase ctx = new UPdatabase())
     {
         var allRows = ctx.UpData.ToList();
         if (toolStripMenu.DropDownItems.Count != 0)
         {
             toolStripMenu.DropDownItems.Clear();
         }
         foreach (var name in allRows)
         {
             toolStripMenu.DropDownItems.Add(name.ID + "-" + name.UserName, null, myClickHandler);
             item = ctx.UpData.FirstOrDefault(s => s.UserName == name.UserName);
         }
     }
 }
开发者ID:dickjones00,项目名称:PassCop,代码行数:16,代码来源:GetAllDbItems.cs


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