Exemplo n.º 1
0
 public WatchListVm(IWatchListView view, WatchList watchList)
 {
     _view      = view;
     _watchList = watchList;
     _watchList.PropertyChanged += _watchList_PropertyChanged;
     SelectAll      = new DelegateCommand(SelectAllExecuted, SelectAllCanExecute);
     ClearSelection = new DelegateCommand(ClearSelectionExecuted, ClearSelectionCanExecute);
     RemoveSelected = new DelegateCommand(RemoveSelectedExecuted, RemoveSelectedCanExecute);
 }
Exemplo n.º 2
0
        public WatchListPresentationModel(IWatchListView view, IWatchListService watchListService, IMarketFeedService marketFeedService, IEventAggregator eventAggregator)
        {
            View                = view;
            this.HeaderInfo     = Resources.WatchListTitle;
            this.WatchListItems = new ObservableCollection <WatchItem>();
            View.Model          = this;

            this.marketFeedService = marketFeedService;

            this.watchList = watchListService.RetrieveWatchList();
            watchList.CollectionChanged += delegate { PopulateWatchItemsList(watchList); };
            PopulateWatchItemsList(watchList);

            eventAggregator.GetEvent <MarketPricesUpdatedEvent>().Subscribe(MarketPricesUpdated, ThreadOption.UIThread);
            RemoveWatchCommand = new DelegateCommand <string>(RemoveWatch);
        }
Exemplo n.º 3
0
 public WatchListVm GetWatchList(IWatchListView view)
 {
     //return new WatchListVm(view, _appContext.WatchList);
     throw new NotSupportedException();
 }