コード例 #1
0
ファイル: Configure.cs プロジェクト: nagyist/IR-Server-Suite
        private void listViewDevices_SelectedIndexChanged(object sender, EventArgs e)
        {
            string guid = DeviceGuid;

            if (String.IsNullOrEmpty(guid))
            {
                return;
            }

            Guid deviceGuid = new Guid(guid);

            _diListener.DeInitDevice();
            _diListener.InitDevice(deviceGuid);

            _device = _diListener.SelectedDevice;
        }
コード例 #2
0
        private bool AcquireDevice()
        {
            if (_deviceList == null)
            {
                return(false);
            }

            foreach (DeviceInstance di in _deviceList)
            {
                if (_config.DeviceGUID.Equals(di.InstanceGuid.ToString(), StringComparison.OrdinalIgnoreCase))
                {
                    return(_diListener.InitDevice(di.InstanceGuid));
                }
            }

            return(false);
        }