コード例 #1
0
        public static bool SetPlayingContent(string ip, string psk, BraviaPlayContent playContent)
        {
            try
            {
                BraviaParameter parameter = new BraviaParameter();
                parameter.Key       = "uri";
                parameter.IsLiteral = false;
                parameter.Value     = BraviaMaps.GetEnumMap(playContent);
                string method = "setPlayContent";

                Send(ip, psk, "avContent", method, "1.0", parameter);

                return(true);
            }
            catch (Exception e)
            {
                return(false);
            }
        }
コード例 #2
0
        public static bool SetPowerStatus(string ip, string psk, BraviaPowerStatus powerStatus)
        {
            try
            {
                BraviaParameter parameter = new BraviaParameter();
                parameter.Key       = "status";
                parameter.IsLiteral = true;
                parameter.Value     = BraviaMaps.GetEnumMap(powerStatus);
                string method = "setPowerStatus";

                Send(ip, psk, "system", method, "1.0", parameter);

                return(true);
            }
            catch (Exception e)
            {
                return(false);
            }
        }