public static List <DEVICEMAPPER> GetAvaliableDevice(STATIONNAME StationName) { if (KeeperData != null) { StationHandler ThisSite = KeeperData.FirstOrDefault(Item => Item.StationName == StationName); if (ThisSite != null) { return(ThisSite.GetAvaliableDevices()); } } return(null); }
public static void SetDeviceList() { if (AstroData.KeeperData == null) { return; } StationHandler ThisStation = AstroData.KeeperData.FirstOrDefault(Item => Item.StationName == ActiveStation); if (ThisStation != null) { ThreadComboClearItemHandler(DeviceCombo); List <DEVICEMAPPER> DeviceList = ThisStation.GetAvaliableDevices(); foreach (DEVICEMAPPER ExistDevice in DeviceList) { ThreadComboAddItemHandler(DeviceCombo, ExistDevice.DeviceName.ToString()); } ThreadComboSelectItemHandler(DeviceCombo, 0); } }