using DevExpress.XtraCharts;
|
using IStation.Epanet;
|
using IStation.Epanet.Enums;
|
using IStation.Model;
|
using MathNet.Numerics;
|
using System;
|
using System.Collections.Generic;
|
using System.ComponentModel.DataAnnotations;
|
using System.Drawing;
|
using System.IO;
|
using System.Linq;
|
using System.Text;
|
|
namespace IStation.WinFrmUI.Monitor
|
{
|
public partial class ModelCorrectionPage : DocumentPage
|
{
|
public ModelCorrectionPage()
|
{
|
InitializeComponent();
|
this.PageTitle.Caption = "模型修正";
|
|
this.gridView1.SetNormalView();
|
this.gridView2.SetNormalView();
|
|
|
|
this.repositoryItemDateEdit1.SetOnlyShowYearMonth();
|
this.repositoryItemDateEdit2.SetOnlyShowYearMonth();
|
this.barEditDateStart.EditValue = new DateTime(2024, 9, 1);
|
this.barEditDateEnd.EditValue = new DateTime(2024, 9, 1);
|
|
this.cmbFlag.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
|
|
this.stationListCtrl1.FocusedChangedEvent += StationListCtrl1_FocusedChangedEvent;
|
this.monitorDataSourcesTreeList1.FocusedChangedEvent += MonitorDataSourcesListCtrl1_FocusedChangedEvent;
|
|
InitialDiagarm();
|
}
|
|
|
private SwiftPlotDiagram _diagram;//图表
|
private Series _series_default_head; //
|
private Series _series_curve_head; //
|
private Series _series_correct_curve_head; //
|
private void InitialDiagarm()
|
{
|
this.chartControl1.Legend.Visibility = DevExpress.Utils.DefaultBoolean.False;//是否在图表上显示图例
|
|
_diagram = (SwiftPlotDiagram)this.chartControl1.Diagram;
|
_diagram.EnableAxisXScrolling = true;//X轴是否允许滚动
|
_diagram.EnableAxisXZooming = true;//X轴是否允许缩放
|
_diagram.PaneLayout.Direction = PaneLayoutDirection.Vertical;//窗格的对齐方式
|
|
_diagram.AxisX.DateTimeScaleOptions.MeasureUnit = DateTimeMeasureUnit.Minute;
|
|
|
_series_default_head = chartControl1.GetSeriesByName("SeriesDefaultHead");
|
_series_curve_head = chartControl1.GetSeriesByName("SeriesCurveHead");
|
_series_correct_curve_head = chartControl1.GetSeriesByName("SeriesCorrectCurveHead");
|
|
_series_default_head.CrosshairLabelPattern = "监测扬程:{V}";
|
_series_curve_head.CrosshairLabelPattern = "模型扬程:{V}";
|
_series_correct_curve_head.CrosshairLabelPattern = "扬程偏差:{V}";
|
|
//定制窗格的滚动条的外观
|
ScrollBarOptions scrollBarOptions = _diagram.DefaultPane.ScrollBarOptions;
|
scrollBarOptions.BackColor = Color.White;
|
scrollBarOptions.BarColor = Color.LightSlateGray;
|
scrollBarOptions.BorderColor = Color.DarkGray;
|
scrollBarOptions.BarThickness = 15;
|
scrollBarOptions.XAxisScrollBarAlignment = ScrollBarAlignment.Far;
|
scrollBarOptions.XAxisScrollBarVisible = true;
|
|
}
|
|
|
#region ViewModel
|
|
public class PumpFactorViewModel
|
{
|
[Display(Name = "泵")]
|
public int Flag { get; set; }
|
|
[Display(Name = "频率")]
|
public double Hz { get; set; }
|
|
[Display(Name = "总体标准差")]
|
public double STDP { get; set; }
|
|
[Display(Name = "扬程(STDP)")]
|
public double STDPHead { get; set; }
|
|
[Display(Name = "备注")]
|
public string Note { get; set; }
|
|
public void Round()
|
{
|
this.STDP = Math.Round(this.STDP, 5);
|
this.STDPHead = Math.Round(this.STDPHead, 5);
|
}
|
|
}
|
|
public class ModelDiffViewModel
|
{
|
[Display(Name = "时间")]
|
public string Time { get; set; }
|
|
[Display(Name = "监测标识")]
|
public string MonitorID { get; set; }
|
|
[Display(Name = "模型标识")]
|
public string ModelID { get; set; }
|
|
[Display(Name = "类型")]
|
public string Type { get; set; }
|
|
[Display(Name = "模型值")]
|
public double ModelValue { get; set; }
|
|
[Display(Name = "监测值")]
|
public double MonitorValue { get; set; }
|
|
[Display(Name = "偏差值")]
|
public double DiffVlaue { get; set; }
|
|
[Display(Name = "泵")]
|
public bool IsPump { get; set; }
|
|
[Display(Name = "泵")]
|
public int? Flag { get; set; }
|
|
[Display(Name = "频率")]
|
public double? Hz { get; set; }
|
public double? HzRound { get; set; }
|
|
}
|
|
#endregion
|
|
private BLL.StationSignalRecordPacket _bll = new BLL.StationSignalRecordPacket();
|
private Model.Station _station = null;
|
private Model.MonitorDataSources _monitorDataSources = null;
|
|
private List<ModelDiffViewModel> _model_diff_vm_list = null;
|
|
private string _model_file = System.IO.Path.Combine
|
(Settings.File.RootDirectory, Settings.File.DataFolder, "ch2_v3_20240801(Clear).inp");
|
|
/// <summary>
|
/// 清空数据
|
/// </summary>
|
public void Clear()
|
{
|
_model_diff_vm_list = new List<ModelDiffViewModel>();
|
this.cmbFlag.SelectedItem = null;
|
this.cmbFlag.Properties.Items.Clear();
|
this.modelTimeViewModelBindingSource.DataSource = new List<ModelDiffViewModel>();
|
this.pumpFactorViewModelBindingSource.DataSource = new List<PumpFactorViewModel>();
|
|
|
ClearChart();
|
}
|
|
private void ClearChart()
|
{
|
|
this.chartControl1.BeginInit();
|
_series_default_head.Points.Clear();
|
_series_curve_head.Points.Clear();
|
_series_correct_curve_head.Points.Clear();
|
this.chartControl1.EndInit();
|
}
|
|
/// <summary>
|
/// 初始化数据
|
/// </summary>
|
public override void InitialDataSource()
|
{
|
this.stationListCtrl1.SetBindingData();
|
this.monitorDataSourcesTreeList1.SetBindingData();
|
}
|
|
//泵站变换
|
private void StationListCtrl1_FocusedChangedEvent(Model.Station obj)
|
{
|
_station = obj;
|
WaitFrmHelper.ShowWaitForm();
|
SetBindingData(_monitorDataSources, _station);
|
WaitFrmHelper.HideWaitForm();
|
|
}
|
|
//来源变换
|
private void MonitorDataSourcesListCtrl1_FocusedChangedEvent(Model.MonitorDataSources obj)
|
{
|
_monitorDataSources = obj;
|
WaitFrmHelper.ShowWaitForm();
|
SetBindingData(_monitorDataSources, _station);
|
WaitFrmHelper.HideWaitForm();
|
}
|
|
|
/// <summary>
|
/// 绑定数据
|
/// </summary>
|
public void SetBindingData(Model.MonitorDataSources monitorDataSources, Model.Station station)
|
{
|
try
|
{
|
Clear();
|
if (monitorDataSources == null || station == null)
|
{
|
return;
|
}
|
if (this.barCekLoad.Checked)
|
{
|
return;
|
}
|
|
|
var station_index = station.SortCode;
|
var dt_start = Convert.ToDateTime(this.barEditDateStart.EditValue);
|
var dt_end = Convert.ToDateTime(this.barEditDateEnd.EditValue);
|
var packets = _bll.Get(monitorDataSources.ID, station.ID);
|
packets = packets?.Where(x => (x.Year >= dt_start.Year && x.Year <= dt_end.Year) && (x.Month >= dt_start.Month && x.Month <= dt_end.Month)).ToList();
|
if (packets == null || !packets.Any())
|
return;
|
|
var pumps = new BLL.Equipment().GetPumpListByBelongTypeAndBelongID(IStation.ObjectType.Station, station.ID);
|
if (pumps == null || !pumps.Any())
|
{
|
return;
|
}
|
var root_folder = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "分析系数");
|
var fileName = root_folder + "\\" + station.Name + ".json";
|
var json = File.ReadAllText(fileName);
|
var analysis_factor_list = JsonHelper.Json2Object<List<AnalysisFactorHelper.AnalysisFactorDto>>(json);
|
|
var flag_pump_dict = pumps.ToDictionary(x => x.SortCode, x => x.RatedParas);
|
var flag_curve_dict = new Dictionary<int, Model.CurveExpress>();
|
var bll_curve = new BLL.PumpCurve();
|
foreach (var pump in pumps)
|
{
|
Model.CurveExpress qh = null;
|
var curve_info = bll_curve.GetDefaultWorkingByPumpID(pump.ID)?.CurveInfo;
|
if (curve_info != null)
|
{
|
qh = curve_info.CurveQH;
|
}
|
flag_curve_dict.Add(pump.SortCode, qh);
|
}
|
if (flag_curve_dict == null || !flag_curve_dict.Any())
|
{
|
return;
|
}
|
|
var flag_list = pumps.Select(x => x.SortCode).OrderBy(x => x).ToList();
|
this.cmbFlag.Properties.Items.AddRange(flag_list);
|
|
var pressure_id_mapping_dict = AnalysisFactorHelper.GetPumpPressureIdMappingDict(station_index);
|
var flow_id_mapping_dict = AnalysisFactorHelper.GetPumpFlowIdMappingDict(station_index);
|
var pump_id_mapping_dict = AnalysisFactorHelper.GetPumpIdMappingDict(station_index);
|
|
|
var model_id_index_dict=new Dictionary<int, int>();
|
|
var all_flag_curve_dict = GetAllPumpCurveDict();
|
var err = EpanetMethods.ENopen(_model_file, "", "");
|
if (err != ErrorCode.Ok)
|
{
|
return;
|
}
|
|
err = EpanetMethods.ENopenH();
|
if (err != ErrorCode.Ok)
|
{
|
return;
|
}
|
|
|
foreach (var item in GlobalHelper.ModelCurveIdMappingDict)
|
{
|
var flag = item.Key;
|
var curve_id = item.Value;
|
EpanetMethods.ENgetcurveindex(curve_id, out int curve_index);
|
|
var count = 100;
|
var qh = all_flag_curve_dict[flag];
|
var curve_points = qh.GetFitPoints(count);
|
var flow_list = curve_points.Select(x => (float)x.X).ToArray();
|
var head_list = curve_points.Select(x => (float)x.Y).ToArray();
|
|
var bol = CheckYValues(head_list, count);
|
if (!bol)
|
{
|
return;
|
}
|
var e = EpanetMethods.ENsetcurve(curve_index, flow_list, head_list, count);
|
if (e != 0)
|
{
|
throw new Exception(e.ToString());
|
}
|
}
|
|
|
var vm_list = new List<ModelDiffViewModel>();
|
var model_id_build = new StringBuilder(31);
|
|
EpanetMethods.ENgetcount(CountType.Node, out int node_count);
|
EpanetMethods.ENgetcount(CountType.Link, out int link_count);
|
|
foreach (var packet in packets)
|
{
|
var station_signal_records = packet.StationSignalRecords;
|
if (station_signal_records == null || !station_signal_records.Any())
|
continue;
|
foreach (var record in station_signal_records)
|
{
|
var time = record.Time.ToString("G");
|
Tuple<Dictionary<string, float[]>, Dictionary<string, double>[]> tuple = null;
|
if (station_index == 1)
|
{
|
tuple = AnalysisFactorHelper.GetStation1(record.ModelRecordDict);
|
}
|
else
|
{
|
tuple = AnalysisFactorHelper.GetStation2(record.ModelRecordDict);
|
}
|
|
var pattern_dict = tuple.Item1;
|
var scada_dict = tuple.Item2[0];
|
var pump_dict = tuple.Item2[1];
|
var pump_raito_dict = tuple.Item2[2];
|
|
if (this.barCekUseAnalysisFactor.Checked)
|
{
|
if (analysis_factor_list != null && analysis_factor_list.Any())
|
{
|
for (int link_index = 1; link_index <= link_count; link_index++)
|
{
|
if (EpanetMethods.ENgetlinkid(link_index, model_id_build) != ErrorCode.Ok)
|
continue;
|
var model_id = model_id_build.ToString();
|
EpanetMethods.ENgetlinktype(link_index, out LinkType linkType);
|
if (linkType == LinkType.Pump)
|
{
|
EpanetMethods.ENgetlinkvalue(link_index, LinkValue.Setting, out float on_off);
|
if (on_off <= 0)
|
continue;
|
if (!pump_raito_dict.ContainsKey(model_id))
|
{
|
continue;
|
}
|
var flag = pump_raito_dict[model_id];
|
var hz = Math.Round(on_off * 50);
|
var qh = flag_curve_dict[(int)flag];
|
var afc = analysis_factor_list.Find(x => x.Hz == hz && x.Flag == flag);
|
if (afc == null || !afc.HeadDeviation.HasValue)
|
{
|
continue;
|
}
|
float head_dev = (float)afc.HeadDeviation.Value;
|
var qh_correct_points = qh.DefinePoints.Select(x => new Model.CurvePoint(x.X, x.Y + afc.HeadDeviation.Value)).ToList();
|
var qh_correct = Model.FitCurveHelper.BuildCurveExpress(qh_correct_points, Model.eCurveFitType.CubicCurve);
|
//var similar_qh = Model.CurveCalcuHelper.CalculateSimilarQH(qh_correct, 50, hz);
|
//if (similar_qh == null)
|
// continue;
|
|
|
var curve_points = qh_correct.GetFitPoints(100);
|
var flow_list = curve_points.Select(x => (float)x.X).ToArray();
|
var head_list = curve_points.Select(x => (float)x.Y).ToArray();
|
|
var bol = CheckYValues(head_list, 100);
|
if (!bol)
|
{
|
|
}
|
|
var e = EpanetMethods.ENgetheadcurveindex(link_index, out int curve_index);
|
if (e != 0)
|
{
|
|
}
|
e = EpanetMethods.ENgetcurveid(curve_index, model_id_build);
|
if (e != 0)
|
{
|
|
}
|
//float[] flow_list = new float[200];
|
//float[] head_list = new float[200];
|
//EpanetMethods.ENgetcurve(curve_index, model_id_build, out int point_count_1, flow_list, head_list);
|
//flow_list = flow_list.Take(point_count_1).ToArray();
|
//head_list = head_list.Take(point_count_1).Select(x => x + head_dev).ToArray();
|
|
e = EpanetMethods.ENsetcurve(curve_index, flow_list, head_list, 100);
|
if (e != 0)
|
{
|
|
}
|
}
|
}
|
}
|
}
|
|
var pattern_init = true;
|
foreach (var pattern in pattern_dict)
|
{
|
var pattern_id = pattern.Key;
|
var pattern_factor_array = pattern.Value;
|
var pattern_factor_array_count = pattern_factor_array.Length == 0 ? 1 : pattern_factor_array.Length;
|
err = EpanetMethods.ENgetpatternindex(pattern_id, out int pattern_index);
|
if (err != ErrorCode.Ok)
|
{
|
pattern_init = false;
|
continue;
|
}
|
err = EpanetMethods.ENsetpattern(pattern_index, pattern_factor_array, pattern_factor_array_count);
|
if (err != ErrorCode.Ok)
|
{
|
pattern_init = false;
|
continue;
|
}
|
}
|
|
if (!pattern_init)
|
continue;
|
|
|
|
var e1 = EpanetMethods.ENinitH(0);
|
if (e1 != ErrorCode.Ok)
|
{
|
|
}
|
var e2 = EpanetMethods.ENrunH(out _);
|
if (e2 != ErrorCode.Ok)
|
{
|
continue;
|
}
|
|
for (int node_index = 1; node_index <= node_count; node_index++)
|
{
|
if (EpanetMethods.ENgetnodeid(node_index, model_id_build) != ErrorCode.Ok)
|
continue;
|
var model_id = model_id_build.ToString();
|
if (pressure_id_mapping_dict.ContainsKey(model_id))
|
{
|
var scada_id = pressure_id_mapping_dict[model_id];
|
|
double? hz = null, hzr = null;
|
int? flag = null;
|
if (pump_dict.ContainsKey(scada_id))
|
{
|
if (!(pump_dict[scada_id] > 0))
|
{
|
continue;
|
}
|
hz = pump_dict[scada_id] * 50;
|
hz = Math.Round(hz.Value, 2);
|
hzr = Math.Round(hz.Value);
|
flag = pump_id_mapping_dict[model_id];
|
}
|
EpanetMethods.ENgetnodevalue(node_index, NodeValue.Head, out float model_head);
|
var scada_value = scada_dict[scada_id];
|
var vm = new ModelDiffViewModel();
|
vm.Time = time;
|
vm.MonitorID = scada_id;
|
vm.ModelID = model_id;
|
vm.ModelValue = model_head;
|
vm.MonitorValue = scada_value;
|
vm.DiffVlaue = model_head - scada_value;
|
vm.Type = "压力";
|
vm.Hz = hz;
|
vm.HzRound = hzr;
|
vm.Flag = flag;
|
if (Math.Round(vm.DiffVlaue) > 100)
|
{
|
continue;
|
}
|
vm_list.Add(vm);
|
}
|
}
|
|
for (int link_index = 1; link_index <= link_count; link_index++)
|
{
|
if (EpanetMethods.ENgetlinkid(link_index, model_id_build) != ErrorCode.Ok)
|
continue;
|
var model_id = model_id_build.ToString();
|
|
if (flow_id_mapping_dict.ContainsKey(model_id))
|
{
|
var scada_id = flow_id_mapping_dict[model_id];
|
double? hz = null, hzr = null;
|
int? flag = null;
|
if (pump_dict.ContainsKey(scada_id))
|
{
|
if (!(pump_dict[scada_id] > 0))
|
{
|
continue;
|
}
|
hz = pump_dict[scada_id] * 50;
|
hz = Math.Round(hz.Value, 2);
|
hzr = Math.Round(hz.Value);
|
flag = pump_id_mapping_dict[model_id];
|
}
|
EpanetMethods.ENgetlinkvalue(link_index, LinkValue.Flow, out float model_value);
|
model_value = Math.Abs(model_value);
|
var scada_value = scada_dict[scada_id];
|
var vm = new ModelDiffViewModel();
|
vm.Time = time;
|
vm.MonitorID = scada_id;
|
vm.ModelID = model_id;
|
vm.ModelValue = model_value;
|
vm.MonitorValue = scada_value;
|
vm.DiffVlaue = model_value - scada_value;
|
vm.Type = "流量";
|
vm.Hz = hz;
|
vm.HzRound = hzr;
|
vm.Flag = flag;
|
vm_list.Add(vm);
|
}
|
|
EpanetMethods.ENgetlinktype(link_index, out LinkType linkType);
|
if (linkType == LinkType.Pump)
|
{
|
EpanetMethods.ENgetlinkvalue(link_index, LinkValue.InitStatus, out float on_off);
|
}
|
}
|
|
}
|
EpanetMethods.ENcloseH();
|
EpanetMethods.ENclose();
|
|
var vm_pump_facotr_list = new List<PumpFactorViewModel>();
|
var group_by_flag = vm_list.Where(x => x.Type == "压力" && x.Flag.HasValue).GroupBy(x => new { x.Flag, x.HzRound });
|
foreach (var flag_item in group_by_flag)
|
{
|
var flag = flag_item.Key.Flag.Value;
|
var pump = flag_pump_dict[flag];
|
var qh = flag_curve_dict[flag];
|
var hz = flag_item.Key.HzRound.Value;
|
|
if (hz < 20)
|
{
|
continue;
|
}
|
|
var head_diff_list = flag_item.Select(x => x.DiffVlaue).ToList();
|
double head_diff_avg = 0d, std_dev_pop = 0d, std_dev_pop_head_avg = 0d;
|
|
var filter_std_dev_pop_tuple = AnalysisFactorHelper.GetFilterBySTDP(head_diff_list.ToArray());
|
var filter_std_dev_pop_array = filter_std_dev_pop_tuple.Item1;
|
std_dev_pop = filter_std_dev_pop_tuple.Item2;
|
std_dev_pop_head_avg = filter_std_dev_pop_array.Average();
|
head_diff_avg = std_dev_pop_head_avg;
|
if (Math.Abs(head_diff_avg) > 5)
|
{
|
continue;
|
}
|
|
if (std_dev_pop > 1 && flag_item.Count() < 5)
|
{
|
continue;
|
}
|
|
var vm_pump_facotr = new PumpFactorViewModel();
|
vm_pump_facotr.Flag = flag;
|
vm_pump_facotr.Hz = hz;
|
vm_pump_facotr.STDP = std_dev_pop;
|
vm_pump_facotr.STDPHead = std_dev_pop_head_avg;
|
vm_pump_facotr.Note = $"{flag_item.Count()}-{filter_std_dev_pop_array.Count()}={flag_item.Count() - filter_std_dev_pop_array.Count()}";
|
vm_pump_facotr.Round();
|
vm_pump_facotr_list.Add(vm_pump_facotr);
|
}
|
|
|
_model_diff_vm_list = vm_list;
|
this.modelTimeViewModelBindingSource.DataSource = vm_list;
|
this.modelTimeViewModelBindingSource.ResetBindings(false);
|
this.gridView1.BestFitColumns();
|
|
|
this.pumpFactorViewModelBindingSource.DataSource = vm_pump_facotr_list;
|
this.pumpFactorViewModelBindingSource.ResetBindings(false);
|
this.gridView2.BestFitColumns();
|
|
|
AlertTool.ShowInfo(System.Windows.Forms.Application.OpenForms[0], "提示", "分析完成!");
|
}
|
|
}
|
catch (Exception ex)
|
{
|
|
throw ex;
|
}
|
}
|
|
bool CheckYValues(float[] xValues, int nPoints)
|
{
|
for (int j = 1; j < nPoints; j++)
|
{
|
if (xValues[j - 1] <= xValues[j])
|
{
|
return false;
|
}
|
}
|
return true;
|
}
|
|
private Dictionary<int, Model.CurveExpress> GetAllPumpCurveDict()
|
{
|
var dict = new Dictionary<int, Model.CurveExpress>();
|
var bll_curve = new BLL.PumpCurve();
|
var station_list = new BLL.Station().GetAll();
|
foreach (var station in station_list)
|
{
|
var pumps = new BLL.Equipment().GetPumpListByBelongTypeAndBelongID(IStation.ObjectType.Station, station.ID);
|
if (pumps == null || !pumps.Any())
|
{
|
return default;
|
}
|
|
|
foreach (var pump in pumps)
|
{
|
Model.CurveExpress qh = null;
|
var curve_info = bll_curve.GetDefaultWorkingByPumpID(pump.ID)?.CurveInfo;
|
if (curve_info != null)
|
{
|
qh = curve_info.CurveQH;
|
}
|
dict.Add(pump.SortCode, qh);
|
}
|
}
|
|
return dict;
|
}
|
|
private void cmbFlag_SelectedIndexChanged(object sender, EventArgs e)
|
{
|
ClearChart();
|
if (_model_diff_vm_list == null || !_model_diff_vm_list.Any())
|
{
|
return;
|
}
|
if (!int.TryParse(this.cmbFlag.Text, out int flag))
|
{
|
return;
|
}
|
var vm_list = _model_diff_vm_list.Where(x => x.Type == "压力" && x.Flag == flag).ToList();
|
if (vm_list == null || !vm_list.Any())
|
{
|
return;
|
}
|
this.chartControl1.BeginInit();
|
foreach (var vm in vm_list)
|
{
|
var time = vm.Time;
|
_series_default_head.Points.Add(new SeriesPoint(time, vm.MonitorValue));
|
_series_curve_head.Points.Add(new SeriesPoint(time, vm.ModelValue));
|
_series_correct_curve_head.Points.Add(new SeriesPoint(time, vm.DiffVlaue));
|
}
|
|
this.chartControl1.EndInit();
|
}
|
|
|
//加载
|
private void barCekLoad_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
|
{
|
WaitFrmHelper.ShowWaitForm();
|
SetBindingData(_monitorDataSources, _station);
|
WaitFrmHelper.HideWaitForm();
|
}
|
|
|
// 刷新数据
|
private void barBtnRefresh_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
|
{
|
InitialDataSource();
|
}
|
|
private void barBtnExportAnalysisFactor_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
|
{
|
if (_monitorDataSources == null || _station == null)
|
{
|
return;
|
}
|
WaitFrmHelper.ShowWaitForm("正在导出");
|
ExportModelAnalysisFactorHelper.Export(_monitorDataSources.ID, _station.ID, _station.SortCode, _station.Name);
|
WaitFrmHelper.HideWaitForm();
|
AlertTool.ShowInfo(System.Windows.Forms.Application.OpenForms[0], "提示", "导出完成!");
|
|
}
|
}
|
}
|