Ejemplo n.º 1
0
 public Tuning(char airConditioneer, char alarmSystem, char parcTronic, Car car)
 {
     AirConditioner = airConditioneer;
     AlarmSystem = alarmSystem;
     Parctronic = parcTronic;
     Car = car;
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 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));
            }
        }
Ejemplo n.º 4
0
 public static void TunePark(Car car)
 {
     ITuning park = new Parctronic(car);
     park.AddTuning();
 }
Ejemplo n.º 5
0
 public static void TuneCar(Car car)
 {
     TuneAir(car);
     TuneAlarm(car);
     TunePark(car);
 }
Ejemplo n.º 6
0
 public static void TuneAlarm(Car car)
 {
     ITuning alarm = new AlarmSystem(car);
     alarm.AddTuning();
 }
Ejemplo n.º 7
0
 public static void TuneAir(Car car)
 {
     ITuning air = new AirConditioner(car);
     air.AddTuning();
 }
Ejemplo n.º 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));
 }
Ejemplo n.º 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();
 }