Example #1
0
 private bool TryCallEvent(TimerHandler eventHandler, TimerEventArgs args = null)
 {
     if (args == null)
     {
         args = new TimerEventArgs();
     }
     if (eventHandler != null)
     {
         eventHandler(this, args);
         return(true);
     }
     return(false);
 }
Example #2
0
 private void timer_OnTomatoFinished(object sender, TimerEventArgs args)
 {
     _bandClient.NotificationManager.VibrateAsync(VibrationType.RampUp);
     TextBlock.Text = "tomato";
 }
Example #3
0
 private void timer_OnGroupComplete(object sender, TimerEventArgs args)
 {
     _bandClient.NotificationManager.VibrateAsync(VibrationType.NotificationTimer);
     TextBlock.Text = "group";
 }
Example #4
0
 private void timer_OnBreakFinished(object sender, TimerEventArgs args)
 {
     _bandClient.NotificationManager.VibrateAsync(VibrationType.NotificationTwoTone);
     TextBlock.Text = "break";
 }
Example #5
0
 private void timer_OnTick(object sender, TimerEventArgs args)
 {
     SecondBlock.Text = string.Format("Elapsed {0:mm\\:ss}", TimeSpan.FromSeconds(args.Elapsed));
 }