private void nudTickCount_ValueChanged(object sender, EventArgs e) { Utility.Log(this, "TickCount", nudTickCount.Value.ToString()); Utility.SaveConfig(sender as Control); if (m_Tick != null) { m_Tick.Dispose(); } m_Tick = new Tick(m_SeqNo, cboAccount.Text, Product == null ? "" : Product.Exchange, Product == null ? "" : Product.StockNo, Product == null ? "" : Product.OrderHead, Product == null ? "" : Product.YM1, Product == null ? "" : Product.YM2, (int)nudTickCount.Value, chkExtend.Checked, chkisAscending.Checked); _SetCell(); }
public static void Disconnected() { try { IsConnected = false; Tick?.Dispose(); SslClient?.Dispose(); TcpClient?.Dispose(); GC.Collect(); } catch { } }
private void nudTickNumber_ValueChanged(object sender, EventArgs e) { if (m_Tick != null) { m_Tick.Dispose(); } m_Tick = new Tick((int)nudTickNumber.Value, chkExtend.Checked, !chkSorting.Checked, (float)nudFontSize.Value) { ProductInfo = (ProductInfo)cboPID.SelectedItem }; _SetCell(); }
public static void Disconnected() { try { IsConnected = false; Packet.IsOk = false; Tick?.Dispose(); SslClient?.Dispose(); TcpClient?.Dispose(); } catch { } }
public static void Reconnect() { try { Tick?.Dispose(); Client?.Dispose(); MS?.Dispose(); } finally { InitializeClient(); } }
/// Cleanup everything and start to connect again. public static void Reconnect() { if (Client.Connected) { return; } Tick?.Dispose(); try { Client?.Close(); Client?.Dispose(); } catch { } MS?.Dispose(); InitializeClient(); }
public static void Disconnected() { try { try { if (File.Exists(Packet.ZipfilePath)) { File.Delete(Packet.ZipfilePath); } } catch { } IsConnected = false; Tick?.Dispose(); SslClient?.Dispose(); TcpClient?.Dispose(); GC.Collect(); } catch { } }