public void Start() { while (true) { Console.Clear(); string mode = ConfigurationManager.AppSettings["Mode"].ToString(); if (mode == "TrainingMode") { ConsoleIO.DisplayTrainingModeMessage(); } //Console.Clear(); char keyPressed = ConsoleIO.DisplayMenu(); switch (keyPressed) { case '1': DisplayOrdersWorkflow displayWorkflow = new DisplayOrdersWorkflow(); displayWorkflow.Execute(); break; case '2': AddOrderWorkflow addWorkflow = new AddOrderWorkflow(); addWorkflow.Execute(); break; case '3': EditOrderWorkflow editWorkflow = new EditOrderWorkflow(); editWorkflow.Execute(); break; case '4': RemoveOrderWorkflow removeWorkflow = new RemoveOrderWorkflow(); removeWorkflow.Execute(); break; case '5': return; default: break; } } }
public static void Start() { while (true) { Console.Clear(); Console.WriteLine("Flooring Program"); Console.WriteLine("1. Display Order"); Console.WriteLine("2. Add Order"); Console.WriteLine("3. Edit Order"); Console.WriteLine("4. Remove Order"); Console.WriteLine("5. Quit"); Console.WriteLine("\nEnter selection: "); string userinput = Console.ReadLine(); switch (userinput) { case "1": DisplayOrderWorkflow displayOrderWorkflow = new DisplayOrderWorkflow(); displayOrderWorkflow.Execute(); break; case "2": AddOrderWorkflow addOrderWorkflow = new AddOrderWorkflow(); addOrderWorkflow.Execute(); break; case "3": EditOrderWorkflow editOrderWorkflow = new EditOrderWorkflow(); editOrderWorkflow.Execute(); break; case "4": RemoveOrderWorkflow removeOrderWorkflow = new RemoveOrderWorkflow(); removeOrderWorkflow.Execute(); break; case "5": return; } } }