Пример #1
0
 public Tuning(char airConditioneer, char alarmSystem, char parcTronic, Car car)
 {
     AirConditioner = airConditioneer;
     AlarmSystem = alarmSystem;
     Parctronic = parcTronic;
     Car = car;
 }
Пример #2
0
 public void Repair(Car car)
 {
     if (car.BattOk == false)
     {
         car.BattOk = true;
     }
     car.CheckAllSystem();
     CashRegister bill = CashRegister.Payd;
     bill.AddBill(200);
     Console.WriteLine(" {0,26} Repaired.  Please pay:{1,14}", car.Name, bill.BillSize.ToString("C", CultureInfo.CurrentCulture));
     //bill.AddBill(200);
        // Console.WriteLine("please pay:" + bill.BillSize.ToString("C",CultureInfo.CurrentCulture));
     bill.ResetCashRegister();
 }
Пример #3
0
        public void Check(Car car)
        {
            if (car.SystemOk)
            {
                Console.WriteLine("Car's systems are OK..." + car.Name);
                Console.WriteLine(new string('-', 30));
            }
            else
            {

                Console.WriteLine("Info=Service is needed - {0,-13} deffect = Battery{1,8}", car.Name, car.BattOk);

                Console.WriteLine(new string('-', 30));
            }
        }
Пример #4
0
 public static void TunePark(Car car)
 {
     ITuning park = new Parctronic(car);
     park.AddTuning();
 }
Пример #5
0
 public static void TuneCar(Car car)
 {
     TuneAir(car);
     TuneAlarm(car);
     TunePark(car);
 }
Пример #6
0
 public static void TuneAlarm(Car car)
 {
     ITuning alarm = new AlarmSystem(car);
     alarm.AddTuning();
 }
Пример #7
0
 public static void TuneAir(Car car)
 {
     ITuning air = new AirConditioner(car);
     air.AddTuning();
 }
Пример #8
0
 private static void UseProxy(Car car1, Car car2, Car car3)
 {
     var car = new CarProxy(new Driver("Otto  ", true, false), car1);
     car.Drive();
     car = new CarProxy(new Driver("Adolf  ", false, true), car2);
     car.Drive();
     car = new CarProxy(new Driver("To-Iama_To_Kanava  ", true, true), car3);
     car.Drive();
     Console.WriteLine(new string('-', 30));
 }
Пример #9
0
 private static void TuneCar(Car car)
 {
     ITuning air = new AirConditioner(car);
     air.AddTuning();
     ITuning alarm = new AlarmSystem(car);
     alarm.AddTuning();
     ITuning park = new Parctronic(car);
     park.AddTuning();
 }