private void OnTimerChanged(object sender, TimerChangedEventArgs e) { var timer = e.Timer; if (timer.IsHidden) { return; } var label = timer.IsSecondary ? labelSecondaryTimer : labelPrimaryTimer; var timerAttributes = _iceHockeyProtocol.Provider.Timers.SingleOrDefault(ta => ta.Id == timer.TimerId); label.Text = timer.ToString(timerAttributes); }
private void ClockRequestHandler(object sender, ClockServerEventArgs e) { // we received a web request for the timer clock info... TimerChangedEventArgs info = _timerService.GetClockRequestInfo(); if (info == null || !info.IsRunning) { e.Mode = ClockServerMode.TimeOfDay; } else { e.Mode = ClockServerMode.Timer; e.Mins = info.ElapsedSecs / 60; e.Secs = info.ElapsedSecs % 60; e.TargetSecs = info.TargetSecs; } }
public void TimerChanged(TimerChangedEventArgs obj) { timerValue = obj.SelectedTime.CounterTime; this.NotifyPropertyChanged(nameof(this.DisplayedCounter)); this.StartCounter(); }