示例#1
0
 public MenuItem(MenuGroup group, ConsoleKey key, string caption, Action onSelection) : this(group, key, onSelection)
 {
     Caption = caption;
 }
示例#2
0
 public static void AwaitKeyPress(this MenuGroup group)
 {
     group.Menu.AwaitKeyPress();
 }
示例#3
0
 public MenuItem(MenuGroup group, ConsoleKey key, Action onSelection)
 {
     Group       = group;
     Key         = key;
     OnSelection = onSelection;
 }
示例#4
0
 public static MenuGroup AddItem(this MenuGroup group, ConsoleKey key, Action onSelection = null)
 {
     group.Items.Add(new MenuItem(group, key, onSelection));
     return(group);
 }