public OverviewViewModel()
        {
            TransferCommand = new Command<AccountOverview>(Transfer);

            var accountsOverview = new AccountsOverview();
            Accounts = accountsOverview.GetAccountsOverview(a=>a.TransferCommand = TransferCommand);

            accountsOverview.OnAccountBalanceChanged((accountNumber, balance) =>
            {
                foreach (var accountOverview in Accounts)
                {
                    if (accountOverview.AccountNumber == accountNumber)
                    {
                        accountOverview.Balance = balance.ToString();
                    }
                }
            });
        }
Exemple #2
0
        public OverviewViewModel()
        {
            TransferCommand = new Command <AccountOverview>(Transfer);

            var accountsOverview = new AccountsOverview();

            Accounts = accountsOverview.GetAccountsOverview(a => a.TransferCommand = TransferCommand);

            accountsOverview.OnAccountBalanceChanged((accountNumber, balance) =>
            {
                foreach (var accountOverview in Accounts)
                {
                    if (accountOverview.AccountNumber == accountNumber)
                    {
                        accountOverview.Balance = balance.ToString();
                    }
                }
            });
        }
 public TransferViewModel()
 {
     TransferCommand = new Command(Transfer);
     _accountsOverview = new AccountsOverview();
 }
 public TransferViewModel()
 {
     TransferCommand   = new Command(Transfer);
     _accountsOverview = new AccountsOverview();
 }