LgBackLight.HidDevice.Open C# (CSharp) Метод

Open() статический приватный Метод

static private Open ( int vendorId, int productId ) : List
vendorId int
productId int
Результат List
        internal static List<HidDevice> Open(int vendorId, int productId)
        {
            return Open(vendorId, new int[] { productId });
        }

Same methods

HidDevice::Open ( string devicePath ) : HidDevice
HidDevice::Open ( int vendorId, IEnumerable productIds ) : List

Usage Example

Пример #1
0
        private static void DeviceAdded(object sender, DeviceEventArgs args)
        {
            HidDevice hidDevice = HidDevice.Open(args.DevicePath);

            // We can be sure a hid device was be returned,
            // since we only registered device notifications
            // for hid devices.
            if (vendorId == hidDevice.VendorId &&
                productIds.Contains(hidDevice.ProductId))
            {
                // The device added appears to be a backlight device.
                devices.Add(args.DevicePath.ToUpper(), hidDevice);
            }
            else
            {
                // Not a backlight device, dispose!
                hidDevice.Dispose();
            }
        }
All Usage Examples Of LgBackLight.HidDevice::Open