Ejemplo n.º 1
0
        public async Task <Result> VolumeUp()
        {
            var sb          = new StringBuilder();
            var powerStatus = await _yamahaService.PowerStatus();

            if (powerStatus == PowerStatusEnum.On)
            {
                var newVolume = await _yamahaService.VolumeUp();

                sb.AppendLine("Yamaha Volume Up.");

                VolumeChangeNotify(newVolume);
                sb.Append($"{newVolume} db");
            }
            else
            {
                sb.AppendLine("Yamaha is turned off");
                PushNotification("Yamaha is turned off. Operation canceled.");
            }

            return(new Result()
            {
                ErrorCode = 0,
                Message = sb.ToString(),
                Ok = true
            });
        }
Ejemplo n.º 2
0
 public async Task <int> VolumeUp()
 {
     return(await YamahaService.VolumeUp());
 }