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)
            {
            }
        }
Esempio n. 2
0
 public void CloseConnection()
 {
     connection.Close();
     isConnected    = false;
     isLogin        = false;
     isNetIntegrity = false;
 }
Esempio n. 3
0
 public static void CloseConnection()
 {
     if (etsConnection != null)
     {
         etsConnection.Close();
     }
 }
Esempio n. 4
0
        public void Close()
        {
            if (connectionETS == null)
            {
                return;
            }

            connectionETS.Close();
        }