Exemple #1
0
 /// <summary>
 /// Erstellt den Handler für die Zahlenbuttons. Dabei wird die gedrückte Zahl (als
 /// CommandParameter in XAML) zum PIN dazugezählt.
 /// </summary>
 /// <returns></returns>
 private ICommand CreatePinNumberCommand()
 {
     return(new RelayCommand(
                (param) =>
     {
         if (param == null)
         {
             return;
         }
         Pin = Pin * 10 + int.Parse(param.ToString());
         if (Pin >= 1000)
         {
             stateMachine.Fire(Triggers.LastPinNumberEntered);
         }
     },
                (param) => stateMachine.CanFire(Triggers.LastPinNumberEntered)
                ));
 }
Exemple #2
0
 public bool CanFire(TTrigger trigger)
 {
     return(_stateMachine.CanFire(trigger));
 }