void ISDBDeviceChangeListener.OnSDBDeviceChanged() { bool wasSelectedDeviceDetached = (SelectedDevice != null) && !DeviceInfoList.Exists(device => SelectedDevice.Serial.Equals(device.Serial));//!DeviceInfoCollection.ContainsKey(SelectedDevice.serial); UpdateDebugTargetList(wasSelectedDeviceDetached); SelectDevice(DeviceInfoList.FindLast(_ => true)); }
private static void PrioritizeSelectedDevice() { if (SelectedDevice != null) { SDBDeviceInfo movedUpDevice = DeviceInfoList.FindLast(device => SelectedDevice.Serial.Equals(device.Serial)); DeviceInfoList.Remove(movedUpDevice); DeviceInfoList.Insert(DeviceInfoList.Count, SelectedDevice); } }