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