| | |
| | | using DevExpress.Utils; |
| | | using DevExpress.XtraCharts; |
| | | using NPOI.OpenXmlFormats.Dml.Diagram; |
| | | using NPOI.SS.Formula.Functions; |
| | | using System.Text; |
| | | using Yw.Geometry; |
| | | |
| | |
| | | /// <summary> |
| | | /// 曲线名显示频率 |
| | | /// </summary> |
| | | public bool LineNameShowHz { get; set; } |
| | | public bool LineNameShowHz |
| | | { |
| | | get => _line_name_show_hz; |
| | | set |
| | | { |
| | | _line_name_show_hz = value; |
| | | this.barCekShowHz.Checked = _line_name_show_hz; |
| | | } |
| | | } |
| | | private bool _line_name_show_hz = false; |
| | | |
| | | #endregion |
| | | |
| | |
| | | UpdateChart(false); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 初始化图表数据 |
| | | /// </summary> |
| | | public void SetEasyChart() |
| | | { |
| | | this.barSubAdd.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; |
| | | } |
| | | #endregion |
| | | |
| | | #region Add Set Curve |
| | |
| | | if (_vm_list == null || !_vm_list.Any()) |
| | | return default; |
| | | |
| | | var list=new List<PumpSectPointViewModel>(); |
| | | foreach (var item in _vm_list) |
| | | var list = new List<PumpSectPointViewModel>(); |
| | | foreach (var x in _vm_list) |
| | | { |
| | | |
| | | var vm = new PumpSectPointViewModel(); |
| | | vm.Id = x.Id; |
| | | vm.Name = x.Name; |
| | | if (x.SectPoint != null) |
| | | { |
| | | var flow = x.SectPoint.X; |
| | | var head = x.SectPoint.Y; |
| | | vm.QueryQ = $"{flow:N1}"; |
| | | vm.QueryH = $"{head:N1}"; |
| | | if (x.QeCalc != null) |
| | | { |
| | | vm.QueryE = $"{x.QeCalc.GetPointY(flow):N1}"; |
| | | } |
| | | if (x.QpCalc != null) |
| | | { |
| | | vm.QueryP = $"{x.QpCalc.GetPointY(flow):N1}"; |
| | | } |
| | | } |
| | | list.Add(vm); |
| | | } |
| | | return list; |
| | | } |