protected override void OnClosing(CancelEventArgs e) { _ordersWindow.DeleteHideable(); _ordersLogWindow.DeleteHideable(); _myTradesWindow.DeleteHideable(); _tradesWindow.DeleteHideable(); _securitiesWindow.DeleteHideable(); _portfoliosWindow.DeleteHideable(); _securitiesWindow.Close(); _tradesWindow.Close(); _myTradesWindow.Close(); _ordersWindow.Close(); _ordersLogWindow.Close(); _portfoliosWindow.Close(); Trader.Dispose(); base.OnClosing(e); }
protected override void OnClosing(CancelEventArgs e) { _ordersWindow.DeleteHideable(); _ordersLogWindow.DeleteHideable(); _myTradesWindow.DeleteHideable(); _tradesWindow.DeleteHideable(); _securitiesWindow.DeleteHideable(); _portfoliosWindow.DeleteHideable(); _securitiesWindow.Close(); _tradesWindow.Close(); _myTradesWindow.Close(); _ordersWindow.Close(); _ordersLogWindow.Close(); _portfoliosWindow.Close(); Trader.Dispose(); _entityRegistry.DelayAction.DefaultGroup.WaitFlush(true); base.OnClosing(e); }