Ejemplo n.º 1
0
        protected override void WndProc(ref Message m)
        {
            base.WndProc(ref m);

            if (m.Msg == UsbNotification.DeviceChangeEvent)
            {
                switch ((int)m.WParam)
                {
                case UsbNotification.UsbDeviceDisconnected:
                    _applicationManager.DeviceDisconnected();
                    break;

                case UsbNotification.UsbDeviceConnected:
                    _applicationManager.DeviceConnectedAsync();
                    break;
                }
            }
        }