Exemplo n.º 1
0
        static void Main(string[] args)
        {
            IElectronticDevice TVClicker           = TVRemote.GetDevice();
            PowerButton        thePowerButton      = new PowerButton(TVClicker);
            VolumeUpButton     theVolumeUpButton   = new VolumeUpButton(TVClicker);
            Button             theVolumeDownButton = new VolumeDownButton(TVClicker);

            thePowerButton.Execute();
            theVolumeUpButton.Execute();
            theVolumeDownButton.Execute();
            Console.ReadKey();
        }
Exemplo n.º 2
0
 public VolumeUpButton(IElectronticDevice device) : base(device)
 {
 }
Exemplo n.º 3
0
 public Button(IElectronticDevice device)
 {
     this.device = device;
 }
Exemplo n.º 4
0
 public PowerButton(IElectronticDevice device) : base(device)
 {
     IsOn = false;
 }