public MakeChangeViewModel(ICurrencyRepo repo) { this.repo = repo; SaveCommand = new BasicCommand(SaveThisRepo); LoadCommand = new BasicCommand(LoadRepo); MakeChangeCommand = new BasicCommand(UpdateMakeChange); CoinsforcdCoins = new ObservableCollection <ICoin>(((USCurrencyRepo)repo).Coins); saveThis = new SaveableCurrencyRepo(repo.Coins); }
//public decimal RepoTotal //{ // get // { // return repo.TotalValue(); // } //} public CurrencyRepoViewModel(ICurrencyRepo repo) { this.repo = repo; AddCoinCommand = new BasicCommand(AddCoinToRepo); RemoveCoinCommand = new BasicCommand(RemoveCoinFromRepo); ResetRepoCommand = new BasicCommand(ResetRepo); CoinsforcdCoins = new ObservableCollection <ICoin>(((USCurrencyRepo)repo).Coins); this.CoinNum = 1; }