本文整理汇总了C#中System.Windows.Forms.ToolStripDropDownItem类的典型用法代码示例。如果您正苦于以下问题:C# ToolStripDropDownItem类的具体用法?C# ToolStripDropDownItem怎么用?C# ToolStripDropDownItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ToolStripDropDownItem类属于System.Windows.Forms命名空间,在下文中一共展示了ToolStripDropDownItem类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: LoadConfigNodes
void LoadConfigNodes(ConfigEntitySection configs, ToolStripDropDownItem root)
{
foreach (ConfigEntitySection section in configs.Sections)
{
SectionMenu node = new SectionMenu(section);
LoadConfigNodes(section, node);
root.DropDownItems.Add(node);
}
foreach (ConfigFileEntity config in configs.List)
{
ConfigMenu node = new ConfigMenu(config);
root.DropDownItems.Add(node);
}
}
开发者ID:xqgzh,项目名称:Z,代码行数:16,代码来源:WinForm.cs
示例17: PersistenceController
public PersistenceController(Model model, Control view, ToolStripDropDownItem recentMenu, EventHandler onItemClick)
{
Model = model;
View = view;
var filter = Properties.Settings.Default.LibraryFilter;
OpenFileDialog = new OpenFileDialog
{
Filter = filter,
Title = "Select the library file to open"
};
SaveFileDialog = new SaveFileDialog
{
Filter = filter,
Title = "Save library file"
};
MruController = new MruController(Application.ProductName + @"\LibraryMRU", recentMenu, onItemClick);
}
开发者ID:dogbiscuituk,项目名称:TagScanner32767,代码行数:17,代码来源:PersistenceController.cs
示例18: MediaController
public MediaController(Model model, StatusController statusController, ToolStripDropDownItem recentMenu, EventHandler onItemClick)
{
Model = model;
StatusController = statusController;
var filter = Properties.Settings.Default.MediaFilter;
OpenFileDialog = new OpenFileDialog
{
Filter = filter,
Multiselect = true,
Title = "Select the media file(s) to add"
};
FolderBrowserDialog = new FolderBrowserDialog
{
Description = "Select the media folder to add"
};
MruController = new MruController(Application.ProductName + @"\MediaMRU", recentMenu, onItemClick);
}
开发者ID:dogbiscuituk,项目名称:TagScanner32767,代码行数:17,代码来源:MediaController.cs
示例19: ApplyResources
/// <summary>
/// Applies resources to the specified <see cref="ToolStripDropDownItem"/>
/// and its child drop down items.
/// </summary>
/// <param name="resources">The <see cref="ComponentResourceManager"/> used to apply the resources.</param>
/// <param name="dropDownItem">The <see cref="ToolStripDropDownItem"/> to apply the resources to.</param>
/// <exception cref="ArgumentNullException"><paramref name="resources"/> is <c>null</c> -or- <paramref name="dropDownItem"/> is <c>null</c>.</exception>
public static void ApplyResources(ComponentResourceManager resources, ToolStripDropDownItem dropDownItem)
{
if (resources == null)
{
throw new ArgumentNullException("resources");
}
if (dropDownItem == null)
{
throw new ArgumentNullException("dropDownItem");
}
for (int i = 0; i < dropDownItem.DropDownItems.Count; i++)
{
LocalizationHelper.ApplyResources(resources, dropDownItem.DropDownItems[i]);
}
resources.ApplyResources(dropDownItem, dropDownItem.Name);
}
开发者ID:jakepetroules,项目名称:jakes-3d-mmo,代码行数:26,代码来源:LocalizationHelper.cs
示例20: ShowList
/// <summary>
/// Populates the list box with the list of undo/redo actions, and displays the form
/// directly below the tool strip button.
/// </summary>
/// <param name="dropDownButton">Tool strip button under which this form should be displayed</param>
/// <param name="undo">true if this is "undo", false for "redo"</param>
/// <param name="undoManager">the UndoManager</param>
public void ShowList(ToolStripDropDownItem dropDownButton, bool undo, UndoManager undoManager)
{
Point location =
dropDownButton.Owner.PointToScreen(new Point(dropDownButton.Bounds.Left, dropDownButton.Bounds.Bottom));
Left = location.X;
Top = location.Y;
_undo = undo;
_undoManager = undoManager;
listBox.Items.Clear();
IEnumerable<String> descriptions = undo ? undoManager.UndoDescriptions : undoManager.RedoDescriptions;
foreach (String description in descriptions)
{
listBox.Items.Add(description);
}
UpdateSelectedIndex(0);
Height = listBox.ItemHeight * Math.Min(MAX_DISPLAY_ITEMS, listBox.Items.Count) + label.Height + TOTAL_BORDER_WIDTH;
Show(dropDownButton.Owner);
listBox.Focus();
}
开发者ID:lgatto,项目名称:proteowizard,代码行数:27,代码来源:UndoRedoList.cs
注:本文中的System.Windows.Forms.ToolStripDropDownItem类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论