示例#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);
 }
示例#2
0
 private void timer_OnTomatoFinished(object sender, TimerEventArgs args)
 {
     _bandClient.NotificationManager.VibrateAsync(VibrationType.RampUp);
     TextBlock.Text = "tomato";
 }
示例#3
0
 private void timer_OnGroupComplete(object sender, TimerEventArgs args)
 {
     _bandClient.NotificationManager.VibrateAsync(VibrationType.NotificationTimer);
     TextBlock.Text = "group";
 }
示例#4
0
 private void timer_OnBreakFinished(object sender, TimerEventArgs args)
 {
     _bandClient.NotificationManager.VibrateAsync(VibrationType.NotificationTwoTone);
     TextBlock.Text = "break";
 }
示例#5
0
 private void timer_OnTick(object sender, TimerEventArgs args)
 {
     SecondBlock.Text = string.Format("Elapsed {0:mm\\:ss}", TimeSpan.FromSeconds(args.Elapsed));
 }