Пример #1
0
        public static void Main()
        {
            player = new CdPlayer();
            tor    = new Garagentor();

            RemoteControl rc = new RemoteControl();

            try{
                rc.SetCommand(0, new CdStart(player), new CdStopp(player));
                rc.SetCommand(1, new GaragentorHoch(tor), new GaragentorRunter(tor));

                rc.PressOn(0);
                rc.PressOn(1);
                rc.PressOff(0);
                rc.PressOff(1);
            }
            catch (WrongDeviceNumberException e) {
                System.Console.Write(e.Message);
            }
        }
Пример #2
0
 public GaragentorRunter(Garagentor garagentor)
 {
     this.garagentor = garagentor;
 }
Пример #3
0
 public GaragentorHoch(Garagentor tor)
 {
     this.tor = tor;
 }
Пример #4
0
 public GaragentorHoch(Garagentor garagentor)
 {
     this.garagentor = garagentor;
 }
Пример #5
0
 public GaragentorRunter(Garagentor tor)
 {
     this.tor = tor;
 }