Ejemplo n.º 1
0
        private static void Watcher()
        {
            while (true)
            {
                if (DeviceChanged != null)
                {
                    _devicesRawNew = StartProcessingGetDevices("adb devices -l");

                    if (_devicesRawNew != _devicesRawOld)
                    {
                        _devicesRawOld = _devicesRawNew;

                        var dl = new AdbDeviceList
                        {
                            GetDevicesRaw  = _devicesRawNew,
                            GetDevicesList = ParseDevicesL(_devicesRawNew)
                        };

                        ConnectedAdbDevices = dl.GetDevicesList.Count;

                        DeviceChanged?.Invoke(dl);
                    }
                }

                Thread.Sleep(750);
            }

            // ReSharper disable once FunctionNeverReturns
        }
Ejemplo n.º 2
0
        private static void Watcher()
        {
            while (true)
            {
                if (DeviceChanged != null)
                {
                    devicesRawNew = StartProcessingGetDevices("adb devices -l");

                    if (devicesRawNew != devicesRawOld)
                    {
                        devicesRawOld = devicesRawNew;

                        AdbDeviceList dl = new AdbDeviceList()
                        {
                            GetDevicesRaw  = devicesRawNew,
                            GetDevicesList = ParseDevicesL(devicesRawNew)
                        };

                        connectedDevices = dl.GetDevicesList.Count;

                        DeviceChanged(dl);
                    }
                }
                Thread.Sleep(750);
            }
        }