コード例 #1
0
        public async Task <bool> SetVolume(int volume)
        {
            if (volume < 0 || volume > 100)
            {
                throw new ArgumentException("volume must be between 0-100");
            }
            var result = await SendCommand(RestCommand.Format(RestCommand.SET_VOLUME, volume));

            return(result == "OK");
        }
コード例 #2
0
        public async Task <bool> SetColor(Color color)
        {
            var result = await SendCommand(RestCommand.Format(RestCommand.SET_COLOR, color));

            return(result == "OK");
        }
コード例 #3
0
        public async Task <bool> SetAudioTrack(AudioTrack audioTrack)
        {
            var result = await SendCommand(RestCommand.Format(RestCommand.SET_TRACK_NUMBER, (int)audioTrack));

            return(result == "OK");
        }
コード例 #4
0
        public async Task <bool> SetPower(bool on)
        {
            var result = await SendCommand(RestCommand.Format(RestCommand.SET_POWER, on ? 1 : 0));

            return(result == "OK");
        }