Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            var remoteController = new Controller();
            var lightCommonder   = new LightCommonderOn();
            var light            = new BedroomLight();

            lightCommonder.SetItem(light);

            remoteController.setCommonder(lightCommonder);

            remoteController.Excute("bedroomlight");

            remoteController.UndoKey();
        }
Ejemplo n.º 2
0
 public void SetItem(IActioner actioner)
 {
     this._bedroomLight = (BedroomLight)actioner;
     this.tag           = "bedroomLight";
 }