예제 #1
0
        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);
        }
예제 #2
0
 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);
     }
 }