/// <summary> /// 实时监测控件 /// </summary> /// <param name="pFreqPlanList">匹配频率列表</param> /// <param name="pRoundStationList">周围台站列表</param> /// <param name="AfterMonitor">保存数据回调</param> /// <param name="activity">活动</param> /// <param name="place">地点</param> public RealTimeMonitor(DetailMonitorPlan p_monitorPlan, List <FreqPlanActivity> pFreqPlanList, List <RoundStationInfo> pRoundStationList, Action <List <Data.Collection.AnalysisResult>, List <Data.Collection.AnalysisResult>, List <Data.Collection.AnalysisResult> > AfterMonitor = null, Activity activity = null, ActivityPlace place = null) { InitializeComponent(); _plan = p_monitorPlan; _viewmodel = Resources["Locator"] as ViewModelLocator; //_cv = new ChartView(); //_cv.DataContext = _viewmodel.FreqDataCollect.LineChartViewModel; //nmb.Children.Add(_cv); _pfreqPlanList = pFreqPlanList; if (_viewmodel != null && _viewmodel.FreqDataCollect != null) { _viewmodel.FreqDataCollect.AfterMonitor += AfterMonitor; _viewmodel.FreqDataCollect.RoundStationInfoList = pRoundStationList; _viewmodel.FreqDataCollect.MonitorPlan = _plan; if (activity != null) { _viewmodel.FreqDataCollect.Activity = activity; } if (place != null) { _viewmodel.FreqDataCollect.Place = place; } } initListBoxData(); DispatcherHelper.Initialize(); img_burst_signal.Opacity = 0.5; ctrlImageflick(); linkAgilentEquipment(); }
private object[,] SourceToObject(List <DetailMonitorPlan> equs) { object[,] obj = null; int rows = equs.Count; ObservableCollection <DataGridColumn> columns = _taskDataGrid.Columns; int cols = columns.Count; obj = new object[rows + 1, cols]; for (int c = 1; c < cols; c++) { DataGridColumn column = columns[c]; obj[0, c - 1] = column.Header; } for (int r = 0; r < rows; r++) { DetailMonitorPlan equ = equs[r]; obj[r + 1, 0] = equ.SENDGROUPIDS;//工作组 for (int i = 0; i < equ.Persons.Count; i++) { } obj[r + 1, 1] = equ.Persons; //obj[r + 1, 2] = equ.FrequencyRange; obj[r + 1, 3] = equ.WORKCONTENT; } return(obj); }
/// <summary> /// 手动,生成任务 /// </summary> /// <param name="p_detailMonitor"></param> public static void SaveMonitorInfo(DetailMonitorPlan p_detailMonitor) { PT_BS_Service.Client.Framework.BeOperationInvoker.Invoke <I_CO_IA.MonitorPlan.I_CO_IA_MonitorPlan> (channel => { channel.SaveDetailMonitorPlan(p_detailMonitor); }); }
public MonitorTaskRunControl(DetailMonitorPlan p_monitorPlan, List <FreqPlanActivity> p_freqPlanActivitys, List <RoundStationInfo> p_roundStationInfos) { InitializeComponent(); this._detailMonitorPlan = p_monitorPlan; this._freqPlanActivitys = p_freqPlanActivitys; this._roundStationInfos = p_roundStationInfos; initGrid(); }
public CreateTaskDialog(DetailMonitorPlan p_task, ActivityPlaceInfo p_placeinfo) { InitializeComponent(); _beginDate.SelectedDate = DateTime.Now; _endDate.SelectedDate = DateTime.Now; activityGuid = p_task.ACTIVITY_GUID; this._currentTask = p_task; this._currentPlace = p_placeinfo; this.DataContext = _currentTask; }
//public TaskDetailDialog(DetailMonitorPlan p_monitorTask, List<FreqPlanInfo> p_freqPlaninfo) //{ // InitializeComponent(); // this._currentTask = p_monitorTask; // this._freqPlanSource = p_freqPlaninfo; // ItemsSourceLoad(); //} public TaskDetailDialog(DetailMonitorPlan p_monitorTask, ActivityPlaceInfo p_placeinfo, List<FreqPlanInfo> _freqPlanSource) { InitializeComponent(); activityId = p_monitorTask.ACTIVITY_GUID; this._currentTask = p_monitorTask; this._currentPlaceInfo = p_placeinfo; this._currentfreqPlanSource = _freqPlanSource; ItemsSourceLoad(); ItemsPontsLoad(p_monitorTask); getFrequencyRange = p_monitorTask.FrequencyRange; }
/// <summary> /// 加载频点信息 /// </summary> /// <param name="p_monitorTask"></param> private void ItemsPontsLoad(DetailMonitorPlan p_monitorTask) { //读取频率预案列表 List<FreqPlanActivity> freqSegment = PrototypeDatas.GetActivityInfo(_currentPlaceInfo.Guid); if (freqSegment.Count > 0) { if (_currentTask.FreqMAINGUIDs.Count > 0) { foreach (var freqid in _currentTask.FreqMAINGUIDs) { } } } }
public MonitorStatistics(string placeid, string p_activityid) { InitializeComponent(); activityId = p_activityid; // _currentPlan = PrototypeDatas.GetMonitorPlan(); DetailMonitorPlan[] getAllDetailMonitor = PrototypeDatas.GetDetailMonitorPlan(placeid, activityid); if (getAllDetailMonitor != null && getAllDetailMonitor.Count() > 0) { foreach (var personList in getAllDetailMonitor) { DetailMonitorPlan orgMonitor = new DetailMonitorPlan(); orgMonitor.SENDGROUPIDS = personList.SENDGROUPIDS; orgMonitor.WORKCONTENT = personList.WORKCONTENT; orgMonitor.Persons = PrototypeDatas.GetOrgOfPerson(personList.SENDGROUPIDS); List <string> liststr = new List <string>(); if (personList.IMPORTFREQUENCYRANGE.Contains(',') == true) { liststr = personList.IMPORTFREQUENCYRANGE.Split(',').ToList(); } else { liststr.Add(personList.IMPORTFREQUENCYRANGE); } orgMonitor.FrequencyRange = liststr; originalMontiorList.Add(orgMonitor); } var groupAllList = originalMontiorList.GroupBy(p => p.SENDGROUPIDS).ToList();//以监测组id进行分组操作 foreach (var group in groupAllList) { var personList = group.ToList(); foreach (var person in personList) { DetailMonitorPlan orgMonitor = new DetailMonitorPlan(); orgMonitor.SENDGROUPIDS = person.SENDGROUPIDS; orgMonitor.WORKCONTENT = person.WORKCONTENT; orgMonitor.Persons = person.Persons; orgMonitor.FrequencyRange = person.FrequencyRange; curentMontiorList.Add(orgMonitor); } } } _taskDataGrid.Items.Clear(); _taskDataGrid.ItemsSource = curentMontiorList; LoadedSearchCondition(); // LoadedViewContent(_currentPlan.Tasks); }
/// <summary> /// 加载,频段范围 /// </summary> /// <param name="frequency"></param> /// <param name="p_exstFreqs">传过来的频段范围值</param> public FreqSelectDialog(DetailMonitorPlan frequency, List <string> p_exstFreqs) { InitializeComponent(); this.rangeListSource = frequency; this._isRangeFreq = true; ExsitRangeFreqs = p_exstFreqs; if (ExsitRangeFreqs.Count > 0) { foreach (var strfreq in ExsitRangeFreqs) { FreqRange _freq = new FreqRange(); _freq.FreqFrom = Convert.ToDouble(strfreq.Split('-')[0]); _freq.FreqTo = Convert.ToDouble(strfreq.Split('-')[1]); _rangeListSource.Add(_freq); } } _freqRangeLBox.ItemsSource = _rangeListSource; // _freqRangeLBox.ItemsSource = rangeListSource.FrequencyRange; _freqRangeGrid.Visibility = System.Windows.Visibility.Visible; _freqRangeGrid.DataContext = this; }
private void SaveDetailMonitor(DetailMonitorPlan p_monitor) { }