private bool IsConnected() { if (m_cycAccess != null) { wasConnected = !m_cycAccess.isClosed(); } else { wasConnected = false; } #if GUI if (wasConnected) { btnConnect.Text = "Disconnect"; } else { btnConnect.Text = "Connect"; } #endif return(wasConnected); }
private bool isCycAccessCorrect() { lock (UseCycLock) { if (cycAccess == null) { return(false); } if (cycAccess.isClosed()) { return(false); } if (cycAccess.getCycConnection().getHostName() != CycHostName) { return(false); } if (cycAccess.getCycConnection().getBasePort() != CycBasePort) { return(false); } return(true); } }