lixiaojun
2024-12-09 25f7d54d23dd47d6f2bfd91e7edfd218a4b9ec3e
修复水泵分析
已修改1个文件
20 ■■■■■ 文件已修改
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/03-analy/SimulationPumpAnalyChartCtrl.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/03-analy/SimulationPumpAnalyChartCtrl.cs
@@ -85,13 +85,19 @@
            if (vm != null && vm.Items != null)
            {
                var item = vm.Items.FirstOrDefault();
                if (item != null)
                {
                    this.barTxtQ.EditValue = $"{Math.Round(item.Q, 1)}m³/h";
                    this.barTxtH.EditValue = $"{Math.Round(item.H, 2)}m";
                    this.barTxtP.EditValue = $"{Math.Round(item.P ?? 0, 1)}kW";
                    this.barTxtE.EditValue = $"{Math.Round(item.E ?? 0, 1)}%";
                }
                SetCurrent(item);
            }
        }
        //设置当前
        private void SetCurrent(PumpRunViewItemViewModel item)
        {
            if (item != null)
            {
                this.barTxtQ.EditValue = $"{Math.Round(item.Q, 1)}m³/h";
                this.barTxtH.EditValue = $"{Math.Round(item.H, 2)}m";
                this.barTxtP.EditValue = $"{Math.Round(item.P ?? 0, 1)}kW";
                this.barTxtE.EditValue = $"{Math.Round(item.E ?? 0, 1)}%";
            }
        }