Esempio n. 1
0
        private static void OnRepeatTimerElapsed(object sender, ElapsedEventArgs e, HidEvent aHidEvent)
        {
            if (aHidEvent.IsStray)
            {
                //Skip events if canceled
                return;
            }

            aHidEvent.RepeatCount++;
            aHidEvent.Time = DateTime.Now;
            if (aHidEvent.RepeatCount == 1)
            {
                //Re-Start our timer only after the initial delay
                aHidEvent.StartRepeatTimer(aHidEvent.iRepeatSpeed);
            }

            //Broadcast our repeat event
            aHidEvent.OnHidEventRepeat(aHidEvent);
        }
Esempio n. 2
0
    private static void OnRepeatTimerElapsed(object sender, ElapsedEventArgs e, HidEvent aHidEvent)
    {
      if (aHidEvent.IsStray)
      {
        //Skip events if canceled
        return;
      }

      aHidEvent.RepeatCount++;
      aHidEvent.Time = DateTime.Now;
      if (aHidEvent.RepeatCount == 1)
      {
        //Re-Start our timer only after the initial delay 
        aHidEvent.StartRepeatTimer(aHidEvent.iRepeatSpeed);
      }

      //Broadcast our repeat event
      aHidEvent.OnHidEventRepeat(aHidEvent);
    }