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