public static void RestartConnection(int seconds)
        {
            if (quotesTableConId != 0 && tableQuotes != null)
            {
                tableQuotes.Close(quotesTableConId);
            }

            if (etsConnection != null)
            {
                etsConnection.Close();
            }

            tableQuotes   = null;
            etsConnection = null;

            // First variant of timing
            //Thread.Sleep(seconds * 1000);

            // Second variant
            DateTime curTime = DateTime.Now;
            DateTime newTime = curTime.AddSeconds(seconds);

            while (newTime <= DateTime.Now)
            {
            }
        }
Exemplo n.º 2
0
 public void CloseConnection()
 {
     connection.Close();
     isConnected    = false;
     isLogin        = false;
     isNetIntegrity = false;
 }
Exemplo n.º 3
0
 public static void CloseConnection()
 {
     if (etsConnection != null)
     {
         etsConnection.Close();
     }
 }
Exemplo n.º 4
0
        public void Close()
        {
            if (connectionETS == null)
            {
                return;
            }

            connectionETS.Close();
        }