Пример #1
0
        public void MainMenu()
        {
            while (true)
            {
                Console.WriteLine("---|Menu|----");
                Console.WriteLine("Add teacher : 1");
                Console.WriteLine("Add group : 2");
                Console.WriteLine("Add group to teacher: 3");
                Console.WriteLine("Start activity : 4");
                Console.WriteLine("Get Info : 5");
                Console.WriteLine("Get groups grades : 6");
                Console.WriteLine("Settings : 7");
                Console.WriteLine("Exit : 8");
                choise = Console.ReadLine();
                Console.WriteLine(" ");
                switch (choise)
                {
                case "1":
                    AddTeacher(ChoiceSubject());
                    break;

                case "2":
                    AddGroup();
                    break;

                case "3":
                    AddGroupToteacher();
                    break;

                case "4":
                    StartActivity(ChoiceSubject());
                    break;

                case "5":
                    Console.WriteLine(infoService.GetInfo());
                    break;

                case "6":
                    int n = NumberCheck("\n -|Choise Group| -\n" + infoService.GetGroup(),
                                        infoService.GetGroupCount());
                    Console.WriteLine(infoService.GetGroupsGrades(n));
                    break;

                case "7":
                    settingsMenu.SetSettings();
                    break;

                case "8":
                    return;

                default:
                    Console.WriteLine("Interapt input");
                    break;
                }
                Console.WriteLine(" ");
            }
        }