Example #1
0
        static void Main(string[] args)
        {
            SimpleRemoteControl simpleRemote = new SimpleRemoteControl();                      //clientul

            GardenLight gardenLight = new GardenLight();                                       //obiectul cu actiunile / de controlat

            GardenLightOnCommand gardenLightOnCommand = new GardenLightOnCommand(gardenLight); // obiectul care putem sa-l folosim pentru a controla

            simpleRemote.setCommand(gardenLightOnCommand);                                     //
            simpleRemote.buttonPress();                                                        //comanda efectiva
        }
Example #2
0
 public GardenLightOffCommand(GardenLight gardenLigt)
 {
     gardenLight_ = gardenLigt;
 }