/// <summary> /// 检测所有设备 /// </summary> public void CheckAllDevice() { MsgShow.ShowWarning("正在检测设备。。。"); MainThreadDelayAction.Run(3000, MsgShow.Clear); List <IDeviceInfo> deviceIdList = App.Instance.FlightBusManager.CheckDevice(); #if Test deviceIdList = new List <IDeviceInfo>() { new DeviceInfo() { BoardNo = 1, BoardType = BoardType.A429 }, new DeviceInfo() { BoardNo = 1, BoardType = BoardType.A1553 } }; #endif int i = 0; foreach (IDeviceInfo item in deviceIdList) { DeviceUiInfo info = new DeviceUiInfo(); info.BoardNo = item.BoardNo; info.BoardType = item.BoardType; info.DevID = item.DevID; info.Name = "localDevice_" + i++; info.IsSelected = true; _deviceUiInfos.Add(info); } MsgShow.ShowWarning("设备检测完毕。。。"); MainThreadDelayAction.Run(3000, MsgShow.Clear); }
public void DelDevice(DeviceUiInfo info) { DeviceUiInfos.Remove(info); }
public void AddDevice(DeviceUiInfo deviceUiInfo) { DeviceUiInfos.Add(deviceUiInfo); }