コード例 #1
0
        public void RefreshDevices()
        {
            var devices = adb.GetDevices().Where(x => x.Model == "Quest");
            var changed = devices.Count() != _devices.Count || devices.Any(d => !_devices.Any(x => x.Device == d));

            if (changed)
            {
                _devices = devices.Select(d =>
                {
                    return(new AdbDevice
                    {
                        Device = d,
                        Name = adb.GetDeviceName(d.Serial),
                    });
                }).ToList();
                if (_devices.Count == 0)
                {
                    _devices.Add(new AdbDevice());
                }
                DevicesChanged?.Invoke();
            }
        }