/// <summary> /// Transmits the IR Code synchronously (blocking) /// </summary> public static void Transmit(string irCode, UsbUirt.CodeFormat codeFormat, int repeatCount, TimeSpan inactivityWaitTime) { init(); if (inactivityWaitTime == null) { inactivityWaitTime = TimeSpan.Zero; } _controller.Transmit(irCode, codeFormat, repeatCount, inactivityWaitTime); }
public static void TransmitAsync(string irCode, UsbUirt.CodeFormat codeFormat, int repeatCount, TimeSpan inactivityWaitTime) { _controller.TransmitCompleted += new UsbUirt.Controller.TransmitCompletedEventHandler(Uirt_TransmitCompleted); try { init(); if (inactivityWaitTime == null) { inactivityWaitTime = TimeSpan.Zero; } _controller.Transmit(irCode, codeFormat, repeatCount, inactivityWaitTime); } catch { throw; } finally { _controller.TransmitCompleted -= new UsbUirt.Controller.TransmitCompletedEventHandler(Uirt_TransmitCompleted); } }
//private static void Uirt_Received(object sender, UsbUirt.ReceivedEventArgs e) //{ //} private static void Uirt_TransmitCompleted(object sender, UsbUirt.TransmitCompletedEventArgs e) { }