Ejemplo n.º 1
0
 private async System.Threading.Tasks.Task ExecIRCommandAsync()
 {
     if (SelectedIRCommand != null)
     {
         await iRKit.ExecCommandAsync(SelectedIRCommand);
     }
 }
Ejemplo n.º 2
0
        private async System.Threading.Tasks.Task SendMessageAsync()
        {
            var data = "{\"format\":\"raw\",\"freq\":38,\"data\":[4713,1190,1190,1190,1190,1190,1037,1319,1150,1150,1150,1150,1150,1150,1150,1150,2368,1150,1150,1150,1150,1150,1150,1150,1150,54214,4554,1190,1190,1190,1037,1319,1150,1150,1150,1319,1150,1319,1150,1319,1150,1319,2288,1190,1190,1190,1037,1319,1037,1319,1037,54214,4554,1232,1111,1232,1111,1232,1111,1232,1111,1232,1111,1232,1111,1232,1111,1232,2288,1319,1002,1319,1111,1232,1111,1232,1111,54214,4554,1232,1111,1232,1111,1366,1111,1111,1111,1232,1037,1232,1037,1232,1037,1232,2288,1232,1232,1232,1111,1275,1111,1275,1111,54214,4554,1232,1037,1232,1232,1232,1037,1232,1037,1232,1037,1232,1037,1232,1037,1232,2211,1319,1111,1232,1111,1111,1111,1232,1111,54214,4713,1232,1111,1232,1111,1232,1002,1366,1111,1232,1111,1232,1111,1232,1111,1232,2211,1319,1150,1150,1150,1150,1150,1150,1150]}";

            //var content = new StringContent(data, Encoding.UTF8);

            //var request = new HttpRequestMessage(HttpMethod.Post, "http://192.168.0.4/messages");
            //request.Headers.Add("X-Requested-With", "curl");
            //request.Content = content;

            //var response = await httpClient.SendAsync(request);

            Models.IRCommand command = new Models.IRCommand("地デジNHK", data);

            Models.IRKit iRKit = new Models.IRKit();
            await iRKit.ExecCommandAsync(command);
        }