protected override void OnClosing(CancelEventArgs e) { _ordersWindow.DeleteHideable(); _myTradesWindow.DeleteHideable(); _tradesWindow.DeleteHideable(); _securitiesWindow.DeleteHideable(); _portfoliosWindow.DeleteHideable(); _stopOrdersWindow.DeleteHideable(); _newsWindow.DeleteHideable(); _securitiesWindow.Close(); _tradesWindow.Close(); _myTradesWindow.Close(); _ordersWindow.Close(); _portfoliosWindow.Close(); _stopOrdersWindow.Close(); _newsWindow.Close(); if (Trader != null) { _logManager.Sources.Remove(Trader); Trader.Dispose(); } base.OnClosing(e); }
protected override void OnClosing(CancelEventArgs e) { if (_trader != null) { _logManager.Sources.Remove(_trader); _trader.Dispose(); } base.OnClosing(e); }