Beispiel #1
0
        public RemoteController()
        {
            var tvOptionsController = new TvOptionsController();

            _tvCommands = new TvCommand[]
            {
                new TvTurnOnCommand(tvOptionsController),
                new TvTurnOffCommand(tvOptionsController),
                new TvIncreaseVolumeCommand(tvOptionsController),
                new TvDecreaseVolumeCommand(tvOptionsController),
                new TvIncreaseBrightnessCommand(tvOptionsController),
                new TvDecreaseBrightnessCommand(tvOptionsController),
                new TvIncreaseContrastCommand(tvOptionsController),
                new TvDecreaseContrastCommand(tvOptionsController),
                new TvGetOptionsToShowCommand(tvOptionsController),

                new TvMuteVolumeCommand(tvOptionsController),
                new TvUnmuteVolumeCommand(tvOptionsController),
                new TvSetDefaultOptionsCommand(tvOptionsController)
            };
        }
Beispiel #2
0
 public TvDecreaseVolumeCommand(TvOptionsController tvOptionsController) : base(tvOptionsController)
 {
 }
Beispiel #3
0
 public override void Execute() => TvOptionsController.IncreaseVolume();
Beispiel #4
0
 public override void Execute() => TvOptionsController.TurnOff();
Beispiel #5
0
 public TvTurnOffCommand(TvOptionsController tvOptionsController) : base(tvOptionsController)
 {
 }
Beispiel #6
0
 protected TvCommand(TvOptionsController tvOptionsController) => TvOptionsController = tvOptionsController;
Beispiel #7
0
 public override void Execute() => Result = TvOptionsController.GetOptionsToShow();
Beispiel #8
0
 public TvGetOptionsToShowCommand(TvOptionsController tvOptionsController) : base(tvOptionsController)
 {
 }
Beispiel #9
0
 public override void Execute() => TvOptionsController.SetDefaultOptions();
Beispiel #10
0
 public TvSetDefaultOptionsCommand(TvOptionsController tvOptionsController) : base(tvOptionsController)
 {
 }
Beispiel #11
0
 public override void Execute() => TvOptionsController.UnmuteVolume();
Beispiel #12
0
 public TvUnmuteVolumeCommand(TvOptionsController tvOptionsController) : base(tvOptionsController)
 {
 }
Beispiel #13
0
 public override void Execute() => TvOptionsController.DecreaseContrast();
Beispiel #14
0
 public TvIncreaseContrastCommand(TvOptionsController tvOptionsController) : base(tvOptionsController)
 {
 }
Beispiel #15
0
 public override void Execute() => TvOptionsController.DecreaseBrightness();
Beispiel #16
0
 public TvDecreaseBrightnessCommand(TvOptionsController tvOptionsController) : base(tvOptionsController)
 {
 }