public override IMenuItem AddButton(string text, string key, Bitmap icon, PluginIdentity identity) { var item = new ToolStripMenuItem { Text = text }; var menuItem = AddItem(item, identity, key, false); MenuIcon.AssignIcon(menuItem, icon); return(menuItem); }
protected override IDropDownMenuItem AddDropDown(string text, string key, Bitmap icon, PluginIdentity identity) { var item = new ParentBarItem(text) { Padding = new Point(TOOLBAR_ITEM_PADDING_X, TOOLBAR_ITEM_PADDING_Y) };; var menuItem = AddItem(item, identity, key) as IDropDownMenuItem; MenuIcon.AssignIcon(menuItem, icon); return(menuItem); }
public override IMenuItem AddButton(string text, string key, Bitmap icon, PluginIdentity pluginIdentity) { var item = new BarItem(text) { Padding = new Point(TOOLBAR_ITEM_PADDING_X, TOOLBAR_ITEM_PADDING_Y) }; var menuItem = AddItem(item, pluginIdentity, key); MenuIcon.AssignIcon(menuItem, icon); return(menuItem); }
private IDropDownMenuItem AddDropDownCore(ToolStripDropDownItem item, string text, string key, Bitmap icon, PluginIdentity identity, bool label) { item.Text = text; item.Padding = new Padding(ItemPadding); item.ImageScaling = ToolStripItemImageScaling.SizeToFit; var menuItem = AddItem(item, identity, key, label) as IDropDownMenuItem; MenuIcon.AssignIcon(menuItem, icon); return(menuItem); }
protected override IDropDownMenuItem AddDropDown(string text, string key, Bitmap icon, PluginIdentity identity, bool isFirst = false) { if (!isFirst) { var item = new ParentBarItem(text) { Padding = new Point(TOOLBAR_ITEM_PADDING_X, TOOLBAR_ITEM_PADDING_Y) }; var menuItem = AddItem(item, identity, key) as IDropDownMenuItem; MenuIcon.AssignIcon(menuItem, icon); return(menuItem); } else { var item = new ToolStripTabItem() { Text = text, Name = key, Image = icon, }; var menuItem = AddItem(item, identity, key) as IDropDownMenuItem; MenuIcon.AssignIcon(menuItem, icon); return(menuItem); } }