private void StopSendingSvc() { if (keepSending) { keepSending = false; sendThread.Join(); sendThread = null; sendMsgQueue = null; } }
private void StartSendingSvc() { if (!keepSending) { keepSending = true; sendMsgQueue = new SerialPortBuffer(); sendThread = new Thread(SendThread); sendThread.Start(); } }