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