protected override void OnClosing(CancelEventArgs e) { _ordersWindow.DeleteHideable(); _myTradesWindow.DeleteHideable(); _tradesWindow.DeleteHideable(); _securitiesWindow.DeleteHideable(); _stopOrderWindow.DeleteHideable(); _portfoliosWindow.DeleteHideable(); _myWin.DeleteHideable(); _consoleWin.DeleteHideable(); _securitiesWindow.Close(); _tradesWindow.Close(); _myTradesWindow.Close(); _stopOrderWindow.Close(); _ordersWindow.Close(); _portfoliosWindow.Close(); _myWin.Close(); _consoleWin.Close(); if (Trader != null) { Trader.Dispose(); } base.OnClosing(e); }
protected override void OnClosing(CancelEventArgs e) { _ordersWindow.DeleteHideable(); _myTradesWindow.DeleteHideable(); _tradesWindow.DeleteHideable(); _securitiesWindow.DeleteHideable(); _stopOrderWindow.DeleteHideable(); _positionsWindow.DeleteHideable(); _portfoliosWindow.DeleteHideable(); _securitiesWindow.Close(); _tradesWindow.Close(); _myTradesWindow.Close(); _stopOrderWindow.Close(); _ordersWindow.Close(); _positionsWindow.Close(); _portfoliosWindow.Close(); if (Trader != null) { if (_isDdeStarted) { StopDde(); } Trader.Dispose(); } base.OnClosing(e); }
protected override void OnClosing(CancelEventArgs e) { if (_trader != null) { _trader.Dispose(); } base.OnClosing(e); }
protected override void OnClosing(CancelEventArgs e) { _securitiesWindow.DeleteHideable(); _securitiesWindow.Close(); if (Trader != null) { Trader.Dispose(); } base.OnClosing(e); }
protected override void OnClosing(CancelEventArgs e) { foreach (var pair in _chartWindows) { pair.Value.DeleteHideable(); } if (_trader != null) { _trader.Dispose(); } base.OnClosing(e); }
protected override void OnClosing(CancelEventArgs e) { if (_trader != null) { if (_isDdeStarted) { StopDde(); } _trader.Dispose(); } base.OnClosing(e); }
protected override void OnClosing(CancelEventArgs e) { _candlesWindow.DeleteHideable(); _candlesWindow.Close(); if (Trader != null) { if (_isDdeStarted) { StopDde(); } Trader.Dispose(); } base.OnClosing(e); }
private void OnConnect(QuikTrader trader, Exception connectionError) { if (connectionError == null) { _settingErrors.AddRange(trader.Terminal.GetTableSettings() .Select(r => new SettingsError(LocalizedStrings.Str3031Params.Put(r.Table.Caption, r.Error.Message), r.IsCritical))); if (_settingErrors.Count == 0) { OkResult.SetVisibility(true); } } else { MessageBox.Show(this, connectionError.ToString(), "Verifier"); } trader.Dispose(); }
// Protected implementation of Dispose pattern. protected virtual void Dispose(bool disposing) { if (_disposed) { return; } if (disposing) { //handle.Dispose(); // Free any other managed objects here. // } // Free any unmanaged objects here. _localSecurities.Clear(); LuaDisconnect(); Trader.Dispose(); _disposed = true; }
public void Dispose() { if (_isConnected) { try { bStopJobs = true; if (Trader != null) { Trader.Disconnect(); Trader.Dispose(); Trader = null; } Log("Disconnected from <QUIK>"); } catch (Exception e) { Log("Problem Disconnecting <QUIK>" + e); } } }
protected override void OnClosing(CancelEventArgs e) { _trader?.Dispose(); base.OnClosing(e); }