Example #1
0
        public override void Stop()
        {
            if (timer != null)
            {
                timer.Stop();
            }
            foreach (KeyValuePair <IntPtr, CursorData> pair in deviceList)
            {
                pair.Value.CloseCursor();
            }
            if (lowLevelMouseHook != null)
            {
                lowLevelMouseHook.Unhook();
            }
            WFCursor.Show();
            RawDevice.UnregisterRawDevices(0x01, 0x02);
            RawDevice.RawInput -= RawDevice_RawInput;
            isRunning           = false;

            System.Windows.Forms.Application.Exit();

            deviceList.Clear();
            historyList.Clear();
            currentList.Clear();
        }
Example #2
0
        public void Dispose()
        {
            if (hook != null)
            {
                try
                {
                    hook.Dispose();
                }
                catch (Win32Exception)
                {}
            }

            RawDevice.UnregisterRawDevices(0x01, 0x02);
            RawDevice.UnregisterRawDevices(HID_USAGE_PAGE_DIGITIZER, HID_USAGE_DIGITIZER_PEN);
            RawDevice.RawInput -= RawDevice_RawInput;
            Application.Exit();
            inputProvider.IsRunning = false;
        }