public MainViewModel(IStockQueryService queryService, ILocalStockService localStockService, IFavoriteStockService favoriteService) { _queryService = queryService; _localStockService = localStockService; _favoriteStockService = favoriteService; StockListViewModel = new StockListControlViewModel(queryService, favoriteService); AddStockCommand = new DelegateCommand(AddStock_Click); DeleteStockCommand = new DelegateCommand(DeleteStock_Click); AutoRefreshCheckedCommand = new DelegateCommand(AutoRefresh_Checked); SafeModeCheckedCommand = new DelegateCommand(SafeMode_Checked); UpdateAllStockCommand = new DelegateCommand(UpdateAllStock_Click); StockItemDoubleClickCommand = new DelegateCommand <RealTimeStockItem>(StockItem_DoubleClick); TimeInterval = 10; IsAutoRefresh = true; #if DEBUG IsSafeMode = true; #endif _localStockService.InitializeData(); }
public StockListControlViewModel(IStockQueryService stockQueryService, IFavoriteStockService favoriteService) { StockList = new ObservableCollection <RealTimeStockItem>(); _stockQueryService = stockQueryService; _favoriteStockService = favoriteService; }
public StockListControlViewModel(IStockQueryService stockQueryService, IFavoriteStockService favoriteService) { StockList = new ObservableCollection<RealTimeStockItem>(); _stockQueryService = stockQueryService; _favoriteStockService = favoriteService; }