private static ConsoleMenuItem CreateCircularSelectionMenu(ConsoleMenuBase menu) { return(new ConsoleMenuItem( $"CircularSelection = {menu.CircularSelection}", x => { x.Menu.CircularSelection = !x.Menu.CircularSelection; x.Text = $"CircularSelection = {x.Menu.CircularSelection}"; })); }
private static ConsoleMenuItem CreateExecuteOnIndexSelectionMenu(ConsoleMenuBase menu) { return(new ConsoleMenuItem( $"ExecuteOnIndexSelection = {menu.ExecuteOnIndexSelection}", x => { x.Menu.ExecuteOnIndexSelection = !x.Menu.ExecuteOnIndexSelection; x.Text = $"ExecuteOnIndexSelection = {x.Menu.ExecuteOnIndexSelection}"; })); }
private static ConsoleMenuItem CreateSelectorMenu(ConsoleMenuBase menu) { return(new ConsoleMenuItem( "Change selector", new ConsoleMenuItem("Disabled", x => x.Menu.Selector = string.Empty), new ConsoleMenuItem("Arrow ( => )", x => x.Menu.Selector = "=>"), new ConsoleMenuItem("Star ( * )", x => x.Menu.Selector = "*"), new ConsoleMenuItem("Big Double ( >> )", x => x.Menu.Selector = ">>"), new ConsoleMenuItem("Small Double ( » )", x => x.Menu.Selector = "»"), new ConsoleMenuItem( "Enter custom selector", x => { Console.WriteLine("Enter selector"); menu.Selector = Console.ReadLine(); }))); }
private static void HandleCrash(ConsoleMenuBase menu) { menu.ExecutionError += OnError; }