public void Processing() { bool exit = true; do { Console.SetCursorPosition(secondLeft, top); ConsoleKey key = Console.ReadKey().Key; switch (key) { case ConsoleKey.Escape: exit = false; break; case ConsoleKey.D0: UING.ShowMyUI("1) Adding", "2) Deleting", "3) Updating", "4) Find", "5) Analyze", "Main Menu"); break; case ConsoleKey.D1: UING.ShowMyUI("1) Add student", "2) Add group", "3) Add Grade", "Adding"); UIToBLInvoker(1); break; case ConsoleKey.D2: UING.ShowMyUI("1) Delete student", "2) Delete group", "3) Delete grade", "Delete"); UIToBLInvoker(2); break; case ConsoleKey.D3: UING.ShowMyUI("1) Upadte student info", "2) Update group info", "3) Update grade", "Update"); UIToBLInvoker(3); break; case ConsoleKey.D4: UING.ShowMyUI("1) Find student", "2) Find group", "Find"); UIToBLInvoker(4); break; case ConsoleKey.D5: UING.ShowMyUI("1) Average Grades", "2) Average Age", "Analyze"); UIToBLInvoker(5); break; default: break; } } while (exit); }
public void ShowUIMain() { Console.Clear(); UING.ShowMyUI("1) Adding", "2) Deleting", "3) Updating", "4) Find", "5) Analyze", "Main Menu"); this.Processing(); }