public FixedStationDetailDialog(FixedStationInfo stationInfo) { InitializeComponent(); if (stationInfo != null) { monitorStationItemSource = new ObservableCollection <FixedStationInfo>() { stationInfo }; } else { FixedStationQueryCondition queryCondition = new FixedStationQueryCondition(); monitorStationItemSource = MonitorStationHelper.QueryMonitorStationItemSource(queryCondition); } monitorstationdatagrid.ItemsSource = monitorStationItemSource; if (monitorStationItemSource.Count > 0) { this.monitorstationdatagrid.SelectedIndex = 0; } this.equipmentListControl.DoubleClickEvent += equipmentListControl_DoubleClickEvent; this.antennaListControl.DoubleClickEvent += antennaListControl_DoubleClickEvent; monitorStationManageControl.IsReadOnly = true; InitData(); }
private void InitData() { equipmentItemSource = MonitorStationHelper.QueryEquipmentItemSource(StatModeEnum.Fixed); antennaItemSource = MonitorStationHelper.QueryAntennaItemSource(StatModeEnum.Fixed); monitorStationManageControl_MonitorStationSelectionChanged(SelectedMonitorStation); }
public MonitorEquipmentSelectWindow(IList <string> ignoreEquipmentGuidList) { InitializeComponent(); IniCondition(); this.ignoreEquipmentGuidList = ignoreEquipmentGuidList; this.monitorEquipmentListControl.DoubleClickEvent += monitorEquipmentListControl_DoubleClickEvent; if (!System.ComponentModel.DesignerProperties.GetIsInDesignMode(this)) { var datas = MonitorStationHelper.QueryEquipmentItemSource(Data.StatModeEnum.Portable); if (ignoreEquipmentGuidList != null) { var result = from data in datas where !this.ignoreEquipmentGuidList.Contains(data.ID) select data; datas = new ObservableCollection <MonitorStationEquInfo>(result); } DataSource = datas; this.monitorEquipmentListControl.EquipmentItemsSource = datas; } }