Esempio n. 1
0
 public void HandleKeyPress(KeyEventArgs keyEventArgs)
 {
     if (keyEventArgs.Key == Key.S)
     {
         if (DateTime.UtcNow.Subtract(_lastNumericInput).TotalSeconds < 5)
             _minutes = int.Parse(_numericInput);
         _ResetTimer();
         _numericInput = "";
     }
     else if (keyEventArgs.Key == Key.P)
     {
         _PauseOrUnpause();
     }
     else if (keyEventArgs.IsNumber())
     {
         var charDigit = keyEventArgs.ToCharDigit();
         _UpdateNumericInput(charDigit);
     }
 }