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); }
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); }
public WatchListVm GetWatchList(IWatchListView view) { //return new WatchListVm(view, _appContext.WatchList); throw new NotSupportedException(); }