private void TradesClick(object sender, RoutedEventArgs e) { TryInitialize(); foreach (var security in SecurityPicker.SelectedSecurities) { var window = _tradesWindows.SafeAdd(security, s => { // create tick trades window var wnd = new TradesWindow { Title = security.Code + " " + LocalizedStrings.Ticks }; // subscribe on tick trades flow MainWindow.Instance.Trader.RegisterTrades(security); wnd.MakeHideable(); return(wnd); }); if (window.Visibility == Visibility.Visible) { window.Hide(); } else { window.Show(); } } }
private void TradesClick(object sender, RoutedEventArgs e) { TryInitialize(); var window = _tradesWindows.SafeAdd(SelectedSecurity, security => { // create tick trades window var wnd = new TradesWindow { Title = security.Code + " сделки" }; // subscribe on tick trades flow MainWindow.Instance.Trader.RegisterTrades(security); wnd.MakeHideable(); return(wnd); }); if (window.Visibility == Visibility.Visible) { window.Hide(); } else { window.Show(); } }
private void TradesClick(object sender, RoutedEventArgs e) { TryInitialize(); var window = _tradesWindows.SafeAdd(SelectedSecurity, security => { // создаем окно со сделками var wnd = new TradesWindow { Title = security.Code + " сделки" }; // начинаем получать сделки MainWindow.Instance.Trader.RegisterTrades(security); wnd.MakeHideable(); return(wnd); }); if (window.Visibility == Visibility.Visible) { window.Hide(); } else { window.Show(); } }
private void TradesClick(object sender, RoutedEventArgs e) { TryInitialize(); var window = _tradesWindows.SafeAdd(SelectedSecurity, security => { // create tick trades window var wnd = new TradesWindow { Title = security.Code + " сделки" }; // subscribe on tick trades flow MainWindow.Instance.Trader.RegisterTrades(security); wnd.MakeHideable(); return wnd; }); if (window.Visibility == Visibility.Visible) window.Hide(); else window.Show(); }