public string ReadCar(ConsoleOutputService outService)
        {
            outService.WriteMessage("Please entere the your's car name.......");
            var carName = Console.ReadLine();

            return(carName);
        }
예제 #2
0
        public void Execute(Car car, ConsoleOutputService outService)
        {
            switch (car.Command)
            {
            case CarCommands.AddGAS:
                AddGas(car, outService);
                break;

            case CarCommands.Moving:
                Moving(car, outService);
                break;

            case CarCommands.Stopping:
                Stopping(car, outService);
                break;

            case CarCommands.TurnOfTheLights:
                TurnOfTheLights(car, outService);
                break;

            case CarCommands.TurnOnTheLights:
                TurnOnTheLights(car, outService);
                break;
            }
        }
 public CarBootSraper()
 {
     inputService      = new ConsoleInputeService();
     outputService     = new ConsoleOutputService();
     inputParse        = new InputeParse();
     car               = new Car();
     renderCarCommands = new RenderCarCommands();
 }
 public int ReadCommand(ConsoleOutputService outService)
 {
     outService.WriteMessage("---------------------------Welcome----------------------------------------");
     outService.WriteMessage("Please Choose Op:\t0:AddGas\t1:Moving\t2:Stoping\t3:TurnOnTheLights\t4:TurnOfTheLights");
     return(int.Parse(Console.ReadLine()));
 }
예제 #5
0
 void TurnOfTheLights(Car car, ConsoleOutputService outService)
 {
     outService.WriteMessage(string.Format("Turn Of The Lights of {0}< < < < <", car.Name));
 }
예제 #6
0
 void Moving(Car car, ConsoleOutputService outService)
 {
     outService.WriteMessage(string.Format("The {0} is moving>>>>>>>>>>", car.Name));
 }
예제 #7
0
 void Stopping(Car car, ConsoleOutputService outService)
 {
     outService.WriteMessage(string.Format("the {0} now is stoped<><><><>", car.Name));
 }
예제 #8
0
 void AddGas(Car car, ConsoleOutputService outService)
 {
     outService.WriteMessage(string.Format("Add Gas into {0}.........", car.Name));
 }