Пример #1
0
        /// <summary>
        /// Adds the specified scroll direction to the list of scroll keys. Resets its timer if it is already
        /// pressed.
        /// </summary>
        /// <param name="keyCode">The keycode of the scroll direction.</param>
        public static void AddScrollDirection(MouseScrollKeyCode keyCode)
        {
            lock (scrollCounts)
            {
                if (scrollStopwatch == null)
                {
                    scrollStopwatch = Stopwatch.StartNew();
                }

                scrollCounts[(int)keyCode] += 1;
                scrollTimers[(int)keyCode]  = scrollStopwatch.ElapsedMilliseconds + HookManager.ScrollHold;
                updated = true;
            }
        }
Пример #2
0
        /// <summary>
        /// Adds the specified scroll direction to the list of scroll keys. Resets its timer if it is already
        /// pressed.
        /// </summary>
        /// <param name="keyCode">The keycode of the scroll direction.</param>
        public static void AddScrollDirection(MouseScrollKeyCode keyCode)
        {
            lock (scrollCounts)
            {
                if (scrollStopwatch == null) scrollStopwatch = Stopwatch.StartNew();

                scrollCounts[(int)keyCode] += 1;
                scrollTimers[(int)keyCode] = scrollStopwatch.ElapsedMilliseconds + HookManager.ScrollHold;
                updated = true;
            }
        }