-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathToolStripMenuElement.cs
More file actions
35 lines (30 loc) · 1.17 KB
/
ToolStripMenuElement.cs
File metadata and controls
35 lines (30 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// ***********************************************************************
// Copyright (c) Charlie Poole and TestCentric contributors.
// Licensed under the MIT License. See LICENSE file in root directory.
// ***********************************************************************
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace TestCentric.Gui.Elements
{
/// <summary>
/// ToolStripMenuElement is the abstract base for all our menu
/// elements. It wraps a single ToolStripMenuItem. Use the appropriate
/// derived class depending on whether the element is a popup
/// menu, a checked menu item or simply invokes a command.
/// </summary>
public abstract class ToolStripMenuElement : ToolStripElement
{
protected ToolStripMenuItem _menuItem;
public ToolStripMenuElement(ToolStripMenuItem menuItem)
: base(menuItem)
{
_menuItem = menuItem;
}
public ToolStripMenuElement(string text) : this(new ToolStripMenuItem(text)) { }
public ToolStripItemCollection MenuItems
{
get { return _menuItem.DropDown.Items; }
}
}
}