public void IncreaseDuration(TimeSpan increment) { TimeRemaining += increment.GetWholeSeconds(); }
/// <summary> /// Wrap up a Windows forms timer as a Countdown. Provide access to the ticking and the expired event. /// </summary> public Countdown(TimeSpan duration) { TimeRemaining = duration.GetWholeSeconds(); timer = new Timer { Interval = (int)interval.TotalMilliseconds }; timer.Tick += OnTimerTick; }