Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
        //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;
        }