using System; using System.Collections.Generic; using System.Drawing; namespace Apewer.WinForm { /// 菜单项。 public class MenuItem { /// 显示的文本,不设置此属性时菜单将显示未为分隔线。 public string Text { get; set; } /// 点击菜单时要执行的命令。 public Action Action { get; set; } // /// 菜单中显示的图片。 // public Image Image { get; set; } /// 自定义数据。 public virtual object Data { get; set; } /// 创建菜单项。 public MenuItem() { } /// 创建文本菜单项。 public MenuItem(string text) { Text = text; } /// 创建可点击的文本菜单项。 public MenuItem(string text, Action action) { Text = text; Action = action; } } }