public void Set(TimeSpan timeSpan) { if (timeSpan < TimeSpan.Zero) { return; } Clock = timeSpan; ClockChanged?.Invoke(this, new ShotClockStateChangedEventArgs(this)); }
public void SetState(bool active) { if (IsRunning == active) { return; } IsRunning = active; if (!IsRunning) { _timer.Stop(); } else { _timer.Start(); } ClockChanged?.Invoke(this, new ShotClockStateChangedEventArgs(this)); }
protected void OnClockChanged(DateTime clock) { ClockChanged?.Invoke(clock); }