예제 #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();
        }
예제 #2
0
 public void SetItem(IActioner actioner)
 {
     this._bedroomLight = (BedroomLight)actioner;
     this.tag           = "bedroomLight";
 }