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