public void port_Send() { if (Balance_Port != null) { Balance_Port.WriteLine(SendMsg); } }
public void Close() { if (Balance_Port != null && Balance_Port.IsOpen) { Balance_Port.Close(); } if (_CodeCard_Port != null && _CodeCard_Port.IsOpen) { _CodeCard_Port.Close(); } }