Beispiel #1
0
		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);
		}
Beispiel #2
0
		public GaragentorHoch(Garagentor tor) {
			this.tor = tor;
		}
Beispiel #3
0
		public GaragentorRunter(Garagentor tor) {
			this.tor = tor;
		}