private void InitialiseMenu() { menu = new ConsoleMenu("Select a folder"); if (currentDir.Parent != null) { menu.AddItem(new ConsoleMenuItem() { ID = "..", Label = ".." }); } try { var items = new Collection <string>(Directory.EnumerateDirectories(currentDir.FullName).ToArray()); foreach (var s in items) { menu.AddItem(new ConsoleMenuItem() { ID = s, Label = s }); } } catch (Exception e) { Console.WriteLine("This is bad: " + e.Message); } }
private static void Render(ConsoleMenu menu) { Console.Clear(); menu.Draw(); }