public static async Task ShowMenu() { var exit = false; do { Console.Clear(); var mainOption = Terminal.ReadPrompt("System", MainOptions, "Esc to exit this menu"); switch (mainOption.Key) { case ConsoleKey.C: SystemCamera.ShowMenu(); break; case ConsoleKey.I: await TestSystemInfo().ConfigureAwait(false); break; case ConsoleKey.V: await SystemVolume.ShowMenu().ConfigureAwait(false); break; case ConsoleKey.Escape: exit = true; break; } }while (!exit); }
public static void ShowMenu() { var exit = false; do { Terminal.Clear(); var mainOption = Terminal.ReadPrompt("System", MainOptions, "Esc to exit this menu"); switch (mainOption.Key) { case ConsoleKey.C: SystemCamera.ShowMenu(); break; case ConsoleKey.I: TestSystemInfo(); break; case ConsoleKey.V: Task ret = SystemVolume.ShowMenu(); ret.Wait(); break; case ConsoleKey.D: SystemDisplay.ShowMenu(); break; case ConsoleKey.Escape: exit = true; break; } }while (!exit); }