static void WorkingManager() { ManagerMenu(); switch (MotorPool.EnterNumber(4, () => ManagerMenu())) { case 1: manager.Show(); break; case 2: manager.AddCar(); break; case 3: manager.RemoveCar(); break; case 4: manager.RepairCar(); break; } }
static void WorkingProgram() { while (true) { ProgramMenu(); switch (MotorPool.EnterNumber(3, () => ProgramMenu())) { case 1: WorkingManager(); break; case 2: WorkingClient(); break; case 3: ExitProgram(); break; } } }
static void WorkingClient() { //bool flag = true; //while (flag) //{ ClientMenu(); switch (MotorPool.EnterNumber(3, () => ClientMenu())) { case 1: manager.DeliveryInHire(); break; case 2: { if (client.Car.Id == 0) { Console.Clear(); Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("Before to go it is necessary to take the car in hire!"); Console.ForegroundColor = ConsoleColor.Gray; Console.ReadKey(); goto case 1; } client.Trip(); } break; case 3: { //flag = false; manager.ReturningInHire(); } break; //} } }