Пример #1
0
 private void Button_Transmit(object sender, RoutedEventArgs e)
 {
     if (recordedByButton != null)
     {
         IRControl.Transmit(recordedByButton);
     }
 }
Пример #2
0
        private static Task <MethodResponse> OnTransmitCalled(MethodRequest methodRequest, object userContext)
        {
            IRMessage msg = new IRMessage(methodRequest.DataAsJson.Substring(1, methodRequest.DataAsJson.Length - 2));

            IRControl.Transmit(msg);
            string result = "'Transmitted IR signal'";

            return(Task.FromResult(new MethodResponse(Encoding.UTF8.GetBytes(result), 200)));
        }