public void CloseConnection() { if (_connection != null) { _keepAliveTimer.Stop(); _comOK = false; _connection.Close(); } }
private void SetConnection() { try { _connection = EnhancedSerialConnection.Find(); if (_connection == null) { _comOK = false; } else { _comOK = true; } } catch { _comOK = false; _connection.Close(); } }
public void Close(ISerialConnection con) { con.Dispose(); con.Close(); }