private void DepthClick(object sender, RoutedEventArgs e)
        {
            TryInitialize();

            var trader = MainWindow.Instance.Trader;

            var window = _quotesWindows.SafeAdd(SelectedSecurity, security =>
            {
                // subscribe on order book flow
                trader.RegisterMarketDepth(security);

                // create order book window
                var wnd = new QuotesWindow {
                    Title = security.Id + " " + LocalizedStrings.MarketDepth
                };
                wnd.MakeHideable();
                return(wnd);
            });

            if (window.Visibility == Visibility.Visible)
            {
                window.Hide();
            }
            else
            {
                window.Show();
            }
        }
		private void DepthClick(object sender, RoutedEventArgs e)
		{
			TryInitialize();

			var trader = MainWindow.Instance.Trader;

			var window = _quotesWindows.SafeAdd(SelectedSecurity, security =>
			{
				// subscribe on order book flow
				trader.RegisterMarketDepth(security);

				// create order book window
				var wnd = new QuotesWindow { Title = security.Id + " " + LocalizedStrings.MarketDepth };
				wnd.MakeHideable();
				return wnd;
			});

			if (window.Visibility == Visibility.Visible)
				window.Hide();
			else
				window.Show();
		}