예제 #1
0
        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);
        }
예제 #2
0
        protected override void OnClosing(CancelEventArgs e)
        {
            if (_trader != null)
            {
                _logManager.Sources.Remove(_trader);
                _trader.Dispose();
            }

            base.OnClosing(e);
        }