public CoinsViewModel Subscribe(CoinsViewModel subscriber)
 {
     UpdatePutCoinBoxRequest += subscriber.UpdatePutCoinBox;
     UpdateTemplatesRequest  += subscriber.UpdateTemplates;
     DisposeRequest          += subscriber.Dispose;
     subscriber.Publish(this);
     subscriber.Initialize();
     return(subscriber);
 }
 public ICommand Subscribe(CoinsViewModel subscriber)
 {
     GetPayBalanceRequest += subscriber.GetPayBalance;
     PaymentBackRequest   += subscriber.PaymentBack;
     GetCoinsRequest      += subscriber.GetCoinsQty;
     PaymentRequest       += subscriber.Payment;
     subscriber.Publish(this);
     return(this);
 }
Exemple #3
0
 public static CoinsViewModel BindToMainModel(this CoinsViewModel model)
 {
     return(VendingMachineViewModel.Current.Subscribe(model));
 }
Exemple #4
0
 public static ICommand BindCommandToModel(this BaseCommand command, CoinsViewModel model)
 {
     return(command.Subscribe(model));
 }