Exemple #1
0
        public IRMonitor(uint maskCode, List <DeviceID> rtkDeviceIdLookup, List <DeviceID> afDeviceIdLookup)
        {
            MaskCode          = maskCode;
            RTKDeviceIdLookup = rtkDeviceIdLookup;
            AFDeviceIdLookup  = afDeviceIdLookup;

            broadcastReceiver = new DeviceChangeBroadcastReceiver();
            broadcastReceiver.DeviceArrived += broadcastReceiver_DeviceArrived;
            broadcastReceiver.DeviceRemoved += broadcastReceiver_DeviceRemoved;

            foreach (USBDeviceInfo device in USBDevices.GetUSBDevices())
            {
                CheckDevice(device.DeviceID);
            }
        }
Exemple #2
0
        public IRMonitor(uint maskCode)
        {
            MaskCode          = maskCode;
            RTKDeviceIdLookup = new List <DeviceID>()
            {
                DefaultDeviceIdRTK
            };
            AFDeviceIdLookup = new List <DeviceID>()
            {
                DefaultDeviceIdAF
            };

            broadcastReceiver = new DeviceChangeBroadcastReceiver();
            broadcastReceiver.DeviceArrived += broadcastReceiver_DeviceArrived;
            broadcastReceiver.DeviceRemoved += broadcastReceiver_DeviceRemoved;

            foreach (USBDeviceInfo device in USBDevices.GetUSBDevices())
            {
                Console.WriteLine(device.DeviceID.ToString());
                CheckDevice(device.DeviceID);
            }
        }