Beispiel #1
0
        public static void SetDeviceStatus(EmuControllerDevice device)
        {
            device.IsInstalled = false;
            device.IsEnabled   = false;

            foreach (ManagementObject queryObj in Instance.Mos.Get())
            {
                string hardwareId = ((string[])queryObj.Properties["HardwareID"].Value)[0][device.IdPrefix.Length..];
Beispiel #2
0
        private void PopulateDeviceList()
        {
            const int deviceCount = 8;

            Devices = new ObservableCollection <EmuControllerDevice>();
            for (int i = 0; i < deviceCount; i++)
            {
                EmuControllerDevice dev = new EmuControllerDevice
                {
                    DeviceId     = @"VID_DEED&PID_FE0" + i.ToString(),
                    DeviceName   = "EmuController Device #" + (i + 1).ToString(),
                    DeviceIndex  = i,
                    DeviceStatus = "Not Installed",
                    IdPrefix     = "Root\\"
                };
                Devices.Add(dev);
            }
            _ = UpdateDeviceStates();
        }