Esempio n. 1
0
        public TradingViewModel(ViewModelContext viewModelContext,
                                AccountViewModel accountViewModel, SymbolsViewModel symbolsViewModel,
                                TradeViewModel tradeViewModel, OrdersViewModel ordersViewModel,
                                IWpfExchangeService exchangeService, IAccountsService accountsService)
            : base(viewModelContext)
        {
            AccountViewModel = accountViewModel;
            SymbolsViewModel = symbolsViewModel;
            TradeViewModel   = tradeViewModel;
            OrdersViewModel  = ordersViewModel;

            Symbols = new ObservableCollection <SymbolViewModel>();

            this.exchangeService = exchangeService;
            this.accountsService = accountsService;

            ObserveSymbols();
            ObserveAccount();
            ObserveTrade();
            ObserveOrders();

            CloseCommand = new ViewModelCommand(Close);
        }