예제 #1
0
        private void SetTimer()
        {
            StateTimer.Interval = 60000;
            StateTimer.Tick    += (sender, e) =>
            {
                DatetoolStripStatusLabel.Text = DateTime.Now.ToLongDateString();
            };

            StateTimer.Start();
        }
예제 #2
0
        /// <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;
        }
예제 #3
0
 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
         }
     }
 }