Exemple #1
0
 internal MockVendingMachineChangeRepository(int quantity)
 {
     (_proxy = new ModelFactory(null).VendingMachineChangeProxy).Repo.Reinit(Dummies.DummyInitCoins(quantity).ToDictionary(x => x.Key, y => new Coin()
     {
         type = y.Key, quantity = y.Value
     }));
 }
 public VendingMachineViewModel()
 {
     _repositoryFactory    = new ModelFactory(null);
     _customerCashPurse    = _repositoryFactory.CustomerPurseProxy;
     _vendingMachineChange = _repositoryFactory.VendingMachineChangeProxy;
     _goods = _repositoryFactory.GoodsProxy;
 }
 public CashButtonControlPresenter(ICashButtonControlView view, IVendingMachineChange repository)
 {
     _controlKind = AccountType.VendingMachine;
     _vendingMachineChangeRepository = repository;
     _view        = view;
     _view.Shown += _view_Shown;
 }
 public VendingMachineViewPresenter(IVendingMachineView view, IModelFactory model)
 {
     _view = view;
     _repositoryFactory                              = model;
     _customerCashPurseRepository                    = _repositoryFactory.CustomerPurseProxy;
     _customerCachButtonControlPresenter             = _presenterFactory.CreateCustomerCashButtonControlPresenter(_view.CustomerCashButtonControlView, _customerCashPurseRepository);
     _vendingMachineChangeRepository                 = _repositoryFactory.VendingMachineChangeProxy;
     _vendingMachineChangeCashButtonControlPresenter = _presenterFactory.CreateVendingMachineChangeCashButtonControlPresenter(_view.VendingMachineChangeCashButtonControlView, _vendingMachineChangeRepository);
     _goodsRepository                       = _repositoryFactory.GoodsProxy;
     _goodsButtonControlPresenter           = _presenterFactory.CreateGoodsButtonControlPresenter(_view.GoodsButtonControlView, _goodsRepository);
     _fillingCupProgressBarControlPresenter = _presenterFactory.CreateFillingCupProgressBarControlPresenter(_view.FillingCupProgressBarControlView);
     _view.Shown += _view_Shown;
 }
 public IVendingMachineChangeCashButtonControlPresenter CreateVendingMachineChangeCashButtonControlPresenter(ICashButtonControlView view, IVendingMachineChange repository)
 {
     return(new CashButtonControlPresenter(view, repository));
 }