private void SetTimer() { StateTimer.Interval = 60000; StateTimer.Tick += (sender, e) => { DatetoolStripStatusLabel.Text = DateTime.Now.ToLongDateString(); }; StateTimer.Start(); }
/// <summary> /// Handles when navigation event has been thrown. /// </summary> /// <param name="evt">Evt.</param> void HandleNavigationEvent(NavigationEvent evt) { string NextEvent = evt.Name; if (!string.IsNullOrEmpty(currentState) && (NextEvent != currentState)) { SaveTimer(); } StateTimer.Start(); currentState = NextEvent; }
protected virtual void OnInputStateChanged(bool down) { if (down) { if (!m_Cooldown && m_State == false) { m_Timer.Start(AcceptanceTime, Activate); } } else { if (m_State) { OnStateChanged(false); m_Cooldown = true; m_Timer.Start(m_Engine.ConfiguredTiming(Engine.Timings.PostActivation), CooledDown); } else if (!m_Cooldown) { m_Timer.Cancel(); // stop the acceptance timer } } }