private static void TestSimpleConsoleMenuHide() { SimpleConsoleMenu menu = new SimpleConsoleMenu("Choose an option:", "Option 1", "Option 2", "Option 3"); menu.Show(); menu.Hide(); Console.WriteLine($"You selected index {menu.SelectedIndex} which is '{menu.GetSelectedItemName()}'"); }
private static void TestSimpleConsoleMenuNoTitle() { SimpleConsoleMenu menu = new SimpleConsoleMenu(); menu.AddOption("Option 1"); menu.AddOption("Option 2"); menu.AddOption("Option 3"); menu.Show(); Console.WriteLine($"You selected index {menu.SelectedIndex} which is '{menu.GetSelectedItemName()}'"); }
private static void TestSimpleConsoleMenu3() { IEnumerable <string> options = new List <string>() { "Option 1", "Option 2", "Option 3" }; SimpleConsoleMenu menu = new SimpleConsoleMenu("Choose an option:", options); menu.Show(); Console.WriteLine($"You selected index {menu.SelectedIndex} which is '{menu.GetSelectedItemName()}'"); }