From a97513ccbb97b2c471e90b032fabdd2e709b7f32 Mon Sep 17 00:00:00 2001 From: Shuxia Ning <NingShuxia0927@outlook.com> Date: 星期一, 23 十二月 2024 17:28:36 +0800 Subject: [PATCH] 曲线修改 --- WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/99-common/PumpVariableSpeedChartDlg.cs | 29 ++++++++++++++++------------- 1 files changed, 16 insertions(+), 13 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/99-common/PumpVariableSpeedChartDlg.cs b/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/99-common/PumpVariableSpeedChartDlg.cs index 4e36804..7a95229 100644 --- a/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/99-common/PumpVariableSpeedChartDlg.cs +++ b/WinFrmUI/HStation.WinFrmUI.PhartRelation.Core/99-common/PumpVariableSpeedChartDlg.cs @@ -12,15 +12,16 @@ this.Text = "鏇茬嚎瑙嗗浘"; this.WindowState = FormWindowState.Maximized; - this.pumpVariableSpeedInfoCtrl1.SetEvent += (id, qh, qe, qp) => + this.pumpVariableSpeedChart.SetQeVisible(false); + this.pumpVariableSpeedInfoCtrl1.SetEvent += (id, hz, ex_ratio, qh, qe, qp) => { - this.pumpVariableSpeedChart.Set(id, qh, qe, qp); + this.pumpVariableSpeedChart.Set(id, hz, ex_ratio, qh, qe, qp); ResetSectPointGrid(); }; - this.pumpVariableSpeedInfoCtrl1.SetInfoEvent += (id, name, color) => + this.pumpVariableSpeedInfoCtrl1.SetInfoEvent += (id, color) => { - this.pumpVariableSpeedChart.SetInfo(id, name, color); + this.pumpVariableSpeedChart.SetInfo(id, color); ResetSectPointGrid(); }; @@ -33,20 +34,20 @@ this.pumpVariableSpeedChart.AddByHzEvent += () => { AddByHz(); - ResetSectPointGrid(); + ResetSectPointGrid(); }; this.pumpVariableSpeedChart.AddByPointEvent += () => { AddByPoint(); - ResetSectPointGrid(); + ResetSectPointGrid(); }; this.pumpVariableSpeedInfoCtrl1.SetDesignPointEvent += (q, h) => { _design_pt = new Point2d(q, h); - this.pumpVariableSpeedChart.SetDesignPt(new Point2d(q, h)); - ResetSectPointGrid(); + this.pumpVariableSpeedChart.SetEquipPt(_design_pt); + ResetSectPointGrid(); }; this.pumpVariableSpeedChart.OnCalcQueryPoint += (id, pt) => @@ -76,19 +77,21 @@ var vm_info = new Yw.WinFrmUI.Phart.PumpVariableSpeedInfoViewModel(vm); vm_info.IsDefault = true; + vm_info.Name = $"{vm.CurrentSpeed}({vm.CurrentHz}hz)"; vm_info.Color = GetRandomColor(0); vm_info.Calc(); vm_list.Add(vm_info); - + this.pumpVariableSpeedInfoCtrl1.SetBindingData(vm_list, _design_pt); this.pumpVariableSpeedChart.Add(vm_list, _design_pt); return string.Empty; } + private void ResetSectPointGrid() { - var vm_list = this.pumpVariableSpeedChart.GetList(); + var vm_list = this.pumpVariableSpeedChart.GetVmList(); this.pumpVariableSpeedInfoCtrl1.SetSectPoint(vm_list); } @@ -113,7 +116,7 @@ } var vm = new PumpVariableSpeedInfoViewModel(vm_def); vm.Id = Guid.NewGuid().ToString(); - vm.Name = this.pumpVariableSpeedChart.LineNameShowHz ? hz.ToString() : speed.ToString(); + vm.Name = $"{speed}({hz}hz)"; vm.Color = GetRandomColor(index); vm.CurrentHz = hz; vm.CurrentSpeed = speed; @@ -148,7 +151,7 @@ var speed = Math.Round(hz / 50 * vm_def.RatedSpeed); var vm = new PumpVariableSpeedInfoViewModel(vm_def); vm.Id = Guid.NewGuid().ToString(); - vm.Name = this.pumpVariableSpeedChart.LineNameShowHz ? hz.ToString() : speed.ToString(); + vm.Name = $"{speed}({hz}hz)"; vm.Color = GetRandomColor(index); vm.CurrentHz = hz; vm.CurrentSpeed = speed; @@ -185,7 +188,7 @@ } var vm = new PumpVariableSpeedInfoViewModel(vm_def); vm.Id = Guid.NewGuid().ToString(); - vm.Name = this.pumpVariableSpeedChart.LineNameShowHz ? hz.ToString() : speed.ToString(); + vm.Name = $"{speed}({hz}hz)"; vm.Color = GetRandomColor(index); vm.CurrentHz = hz; vm.CurrentSpeed = speed; -- Gitblit v1.9.3