public TrendLinePresentationModel(ITrendLineView view, IMarketHistoryService marketHistoryService, IEventAggregator eventAggregator)
 {
     this.View = view;
     this.View.Model = this;
     this._marketHistoryService = marketHistoryService;
     eventAggregator.GetEvent<TickerSymbolSelectedEvent>().Subscribe(this.TickerSymbolChanged);
 }
        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();
        }
Beispiel #3
0
 public TrendLinePresentationModel(ITrendLineView view, IMarketHistoryService marketHistoryService, IEventAggregator eventAggregator)
 {
     this.View                  = view;
     this.View.Model            = this;
     this._marketHistoryService = marketHistoryService;
     eventAggregator.GetEvent <TickerSymbolSelectedEvent>().Subscribe(this.TickerSymbolChanged);
 }
        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 TrendLineViewModel(IMarketHistoryService marketHistoryService, IEventAggregator eventAggregator)
        {
            if (eventAggregator == null)
            {
                throw new ArgumentNullException("eventAggregator");
            }

            this.marketHistoryService = marketHistoryService;
            eventAggregator.GetEvent <TickerSymbolSelectedEvent>().Subscribe(TickerSymbolChanged);
        }
        public TrendLineViewModel(IMarketHistoryService marketHistoryService, IEventAggregator eventAggregator)
        {
            if (eventAggregator == null)
            {
                throw new ArgumentNullException("eventAggregator");
            }

            this.marketHistoryService = marketHistoryService;
            eventAggregator.GetEvent<TickerSymbolSelectedEvent>().Subscribe(this.TickerSymbolChanged);
        }
Beispiel #7
0
        public TrendLinePresenter(ITrendLineView view, IMarketHistoryService marketHistoryService)
        {
            this.View = view;
            this._marketHistoryService = marketHistoryService;

        }
Beispiel #8
0
 public TrendLineViewModel(IMarketHistoryService marketHistoryService, IEventAggregator eventAggregator)
 {
     this.marketHistoryService = marketHistoryService;
     eventAggregator.GetEvent <TickerSymbolSelectedEvent>().Subscribe(this.TickerSymbolChanged);
 }
Beispiel #9
0
 public TrendLinePresenter(ITrendLineView view, IMarketHistoryService marketHistoryService)
 {
     this.View = view;
     this._marketHistoryService = marketHistoryService;
 }
Beispiel #10
0
 public TrendLineViewModel(IMarketHistoryService marketHistoryService, IEventAggregator eventAggregator)
 {            
     this.marketHistoryService = marketHistoryService;
     eventAggregator.GetEvent<TickerSymbolSelectedEvent>().Subscribe(this.TickerSymbolChanged);
 }