| | |
| | | using DevExpress.CodeParser; |
| | | using HStation.WinFrmUI.PhartRelation; |
| | | using System; |
| | | using HStation.WinFrmUI.PhartRelation; |
| | | using Yw.WinFrmUI.Phart; |
| | | |
| | | namespace HStation.WinFrmUI |
| | | { |
| | | public partial class PumpFullInfoCtrl : DevExpress.XtraEditors.XtraUserControl |
| | | public partial class PumpFullInfoCtrl : DocumentPage |
| | | { |
| | | #region 构造函数和加载函数 |
| | | |
| | |
| | | this.navBarControlPara.GroupExpanded += new DevExpress.XtraNavBar.NavBarGroupEventHandler(this.NavBarControlPara_GroupExpanded); |
| | | this.navBarControlPara.GroupCollapsed += new DevExpress.XtraNavBar.NavBarGroupEventHandler(this.NavBarControlPara_GroupCollapsed); |
| | | this.navBarControlPara.ClientSizeChanged += new System.EventHandler(this.NavBarControlPara_ClientSizeChanged); |
| | | this.PageTitle.Caption = "水泵信息"; |
| | | this.PageTitle.HeaderSvgImage = this.svgImageCollection1[0]; |
| | | } |
| | | |
| | | private PumpMatchingViewModel _pump_mathing_vm = null; |
| | | |
| | | public void SetBindingData(PumpMatchingViewModel pumpMatchingViewModel) |
| | | { |
| | | _pump_mathing_vm = pumpMatchingViewModel; |
| | |
| | | Init(pump_mian_id); |
| | | } |
| | | } |
| | | |
| | | |
| | | private async void Init(long pump_main_id) |
| | | { |
| | |
| | | return; |
| | | } |
| | | var phart = phart_list.OrderBy(x => x.Importance).First(); |
| | | |
| | | |
| | | var diagram = phart.Diagram; |
| | | if (diagram == null) |
| | |
| | | var cubic_spline_qe = new Yw.Geometry.CubicSpline2d(points_qe); |
| | | var cubic_spline_qp = new Yw.Geometry.CubicSpline2d(points_qp); |
| | | |
| | | |
| | | var design_pt = new Yw.Geometry.Point2d(); |
| | | design_pt.X = Math.Round(cubic_spline_qh.MaxX / 2); |
| | | design_pt.Y = Math.Round(cubic_spline_qh.GetPointY(design_pt.X), 1); |
| | | |
| | | |
| | | var disp_paras = diagram.DispParas; |
| | | var is_calc_disp_paras = string.IsNullOrWhiteSpace(disp_paras); |
| | |
| | | this.pumpVariableSpeedInfoCtrl1.SetBindingData(vm_vs_info, design_pt); |
| | | this.pumpVariableSpeedChart1.Add(vm_vs_info, design_pt); |
| | | |
| | | |
| | | var vm_sp = new Yw.WinFrmUI.Phart.PumpSerialParallelViewModel(); |
| | | vm_sp.Id = phart.ID.ToString(); |
| | | vm_sp.Name = $"{pump_main.RatedSpeed}"; |
| | |
| | | this.pumpSingleSerialParallelInfoCtrl1.SetBindingData(vm_sp_info, design_pt); |
| | | this.pumpSerialParallelChart1.Add(vm_sp_info, design_pt); |
| | | } |
| | | |
| | | |
| | | |
| | | private void OnFrmLoad(object sender, EventArgs e) |
| | | { |
| | |
| | | { |
| | | return; |
| | | } |
| | | |
| | | } |
| | | |
| | | private void InitChart() |
| | |
| | | this.pumpPerformInfoCtrl1.SetBindingData(vm_list); |
| | | }; |
| | | |
| | | #endregion |
| | | #endregion 曲线 |
| | | |
| | | #region 变速曲线 |
| | | |
| | |
| | | this.pumpVariableSpeedInfoCtrl1.SetQueryInfo(id, pt); |
| | | }; |
| | | |
| | | |
| | | void ResetSectPointGrid() |
| | | { |
| | | var vm_list = this.pumpVariableSpeedChart1.GetList(); |
| | |
| | | |
| | | void AddBySpeed() |
| | | { |
| | | |
| | | var list = this.pumpVariableSpeedInfoCtrl1.GetList(); |
| | | if (list == null || list.Count < 1) |
| | | { |
| | |
| | | return true; |
| | | }; |
| | | dlg.ShowDialog(); |
| | | |
| | | } |
| | | |
| | | void AddByHz() |
| | | { |
| | | |
| | | var list = this.pumpVariableSpeedInfoCtrl1.GetList(); |
| | | if (list == null || list.Count < 1) |
| | | { |
| | |
| | | dlg.ShowDialog(); |
| | | } |
| | | |
| | | |
| | | #endregion |
| | | #endregion 变速曲线 |
| | | |
| | | #region 串并联曲线 |
| | | |
| | |
| | | return vm_sp; |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #endregion 串并联曲线 |
| | | } |
| | | |
| | | #region Color |
| | |
| | | return Color.FromArgb(r, g, b); |
| | | } |
| | | |
| | | #endregion |
| | | #endregion Color |
| | | |
| | | #region 走马灯提示 |
| | | |
| | |
| | | } |
| | | |
| | | #endregion 走马灯提示 |
| | | |
| | | |
| | | |
| | | public void CloseFrm() |
| | | { |
| | |
| | | } |
| | | |
| | | #endregion 右侧面板宽度 |
| | | |
| | | private void xtraTabControlRight_Click(object sender, EventArgs e) |
| | | { |
| | | |
| | | } |
| | | } |
| | | } |