/// <summary> /// Creates a console menu, having the specified options /// </summary> /// <param name="title">The menu title</param> /// <param name="options">The menu options</param> public static void WriteMenuWithOptions(string title, string[] options) { ConsoleHelper.WriteSeparator(title); if ((options == null) || (options.Length == 0)) { return; } int spacesBeforeCount = (options.Length >= 10) ? 1 : 0; string spacesBefore = new string(' ', spacesBeforeCount); for (int i = 0; i < options.Length; i++) { Console.WriteLine($"{spacesBefore}{i + 1}) {options[i]}"); } ConsoleHelper.WriteSeparator(); }
/// <summary> /// Writes a separator ("-") ocuppying a full screen line /// </summary> public static void WriteSeparator() { ConsoleHelper.WriteSeparator(""); }