示例#1
0
文件: Program.cs 项目: gobi-todic/PK2
		public static void Main (string[] args) {

			CdPlayer player = new CdPlayer();
			CdStart cdStart = new CdStart(player);
			CdStopp cdStopp = new CdStopp(player);

			Garagentor tor = new Garagentor();
			GaragentorHoch hoch = new GaragentorHoch(tor);
			GaragentorRunter runter = new GaragentorRunter(tor);

			RemoteControl rc = new RemoteControl();
			rc.SetCommand(0, cdStart, cdStopp);
			rc.SetCommand(2, hoch, runter);

			rc.PressOn(0);
			rc.PressOn(2);
			rc.PressOff(0);
			rc.PressOff(2);
		}
示例#2
0
文件: CdStart.cs 项目: gobi-todic/PK2
		public CdStart(CdPlayer player) {
			this.player = player;
		}
示例#3
0
文件: CdStopp.cs 项目: gobi-todic/PK2
		public CdStopp(CdPlayer player) {
			this.player = player;
		}