protected override void WndProc(ref Message m)
 {
     // Trap WM_DEVICECHANGE
     if (m.Msg == NativeMethods.WM_DEVICECHANGE)
     {
         DeviceNotify?.Invoke(HidDevices.EnumerateDevices().ToList());
     }
     base.WndProc(ref m);
 }
        protected override void WndProc(ref Message m)
        {
            // Trap WM_DEVICECHANGE
            if (m.Msg == 0x219)
            {
                DeviceNotify?.Invoke(m);
            }

            base.WndProc(ref m);
        }
예제 #3
0
 private void ReportDeviceAttached(Message message)
 {
     DeviceAttached?.Invoke(this, null);
     DeviceNotify?.Invoke(this, new EventArgs <Message>(message));
 }