示例#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);
        }
示例#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);
    }