static void SendMessageToLED(object state) { AddParams LEDShow = (AddParams)state; LED_UDP LED = LEDShow.LEDshow; //byte[] str = System.Text.ASCIIEncoding.Default.GetBytes(LEDShow.LEDshow.ToString()); if (!LED.sendText(LEDShow.strToShow)) { LED.Reset(); Thread.Sleep(300); LED.sendText(LEDShow.strToShow); } LED.close(); }
public void send(LED_UDP led_udp, string ledtext) { AddParams param = new AddParams(led_udp, ledtext); ThreadPool.QueueUserWorkItem(workItem, param); }