|
|
@ -15,12 +15,28 @@ namespace Apewer.WinForm |
|
|
|
/// <summary>点击菜单时要执行的命令。</summary>
|
|
|
|
public Action<MenuItem> Action { get; set; } |
|
|
|
|
|
|
|
/// <summary>菜单中显示的图片。</summary>
|
|
|
|
public Image Image { get; set; } |
|
|
|
// /// <summary>菜单中显示的图片。</summary>
|
|
|
|
// public Image Image { get; set; }
|
|
|
|
|
|
|
|
/// <summary>自定义数据。</summary>
|
|
|
|
public virtual object Data { get; set; } |
|
|
|
|
|
|
|
/// <summary>创建菜单项。</summary>
|
|
|
|
public MenuItem() { } |
|
|
|
|
|
|
|
/// <summary>创建文本菜单项。</summary>
|
|
|
|
public MenuItem(string text) |
|
|
|
{ |
|
|
|
Text = text; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>创建可点击的文本菜单项。</summary>
|
|
|
|
public MenuItem(string text, Action<MenuItem> action) |
|
|
|
{ |
|
|
|
Text = text; |
|
|
|
Action = action; |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|