public PositionSummaryPresentationModel(IPositionSummaryView view, IAccountPositionService accountPositionService , IMarketFeedService marketFeedSvc , IMarketHistoryService marketHistorySvc , ITrendLinePresenter trendLinePresenter , IOrdersController ordersController , IEventAggregator eventAggregator) { View = view; AccountPositionSvc = accountPositionService; MarketHistorySvc = marketHistorySvc; EventAggregator = eventAggregator; MarketFeedSvc = marketFeedSvc; PositionSummaryItems = new ObservableCollection <PositionSummaryItem>(); PopulatePresentationModel(); BuyCommand = ordersController.BuyCommand; SellCommand = ordersController.SellCommand; View.Model = this; _trendLinePresenter = trendLinePresenter; View.ShowTrendLine(trendLinePresenter.View); //Initially show the FAKEINDEX trendLinePresenter.OnTickerSymbolSelected("FAKEINDEX"); eventAggregator.GetEvent <MarketPricesUpdatedEvent>().Subscribe(MarketPricesUpdated, ThreadOption.UIThread); InitializeEvents(); }
public PositionSummaryPresentationModel(IPositionSummaryView view, IAccountPositionService accountPositionService , IMarketFeedService marketFeedSvc , IMarketHistoryService marketHistorySvc , ITrendLinePresenter trendLinePresenter , IOrdersController ordersController , IEventAggregator eventAggregator) { View = view; AccountPositionSvc = accountPositionService; MarketHistorySvc = marketHistorySvc; EventAggregator = eventAggregator; MarketFeedSvc = marketFeedSvc; PositionSummaryItems = new ObservableCollection<PositionSummaryItem>(); PopulatePresentationModel(); BuyCommand = ordersController.BuyCommand; SellCommand = ordersController.SellCommand; View.Model = this; _trendLinePresenter = trendLinePresenter; View.ShowTrendLine(trendLinePresenter.View); //Initially show the FAKEINDEX trendLinePresenter.OnTickerSymbolSelected("FAKEINDEX"); eventAggregator.GetEvent<MarketPricesUpdatedEvent>().Subscribe(MarketPricesUpdated, ThreadOption.UIThread); InitializeEvents(); }
public PositionSummaryPresentationModel(IPositionSummaryView view, IOrdersController ordersController, IEventAggregator eventAggregator, IObservablePosition observablePosition) { this.eventAggregator = eventAggregator; this.Position = observablePosition; View = view; BuyCommand = ordersController.BuyCommand; SellCommand = ordersController.SellCommand; View.Model = this; this.CurrentPositionSummaryItem = new PositionSummaryItem("FAKEINDEX", 0, 0, 0); }