Example #1
0
 public ATMViewModel()
 {
     atm = new BankLibrary.ATM();
     atm.AuthorizationSucceeded += () => AuthorizationSucceeded();
     atm.AuthorizationFailed    += message => AuthorizationFailed(message);
     atm.BalanceChanged         += balance =>
     {
         Balance = balance;
         OnPropertyChanged(nameof(Balance));
     };
     atm.TransferSucceeded += () => TransferSucceeded();
     atm.TransferFailed    += message => TransferFailed(message);
     atm.Error             += e => MessageBox.Show(e.Message);
     AuthorizationCommand   = new AuthorizationCommand(atm);
     CheckBalanceCommand    = new CheckBalanceCommand(atm);
     TransferCommand        = new TransferCommand(atm);
     InsertCardCommand      = new InsertCardCommand(atm);
     ExitCommand            = new ExitCommand(atm);
 }
Example #2
0
 public InsertCardCommand(BankLibrary.ATM atm) : base(atm)
 {
 }