/// <summary> /// 释放资源 /// </summary> public void Release() { try { if (serialPort.IsOpen) { serialPort.Close(); } card.Stop(); readThread.Stop(); } catch { } }