lixiaojun
2024-12-13 3d0d8f7aa9f58ca8759f15001caf4e1e78bb99d1
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/03-analy/SimulationPumpAnalyChartCtrl.cs
@@ -82,16 +82,24 @@
        public void SetBindingData(PumpRunViewViewModel vm)
        {
            this.pumpRunViewChart1.SetBindingData(vm);
            this.barCheckE.Checked = this.pumpRunViewChart1.QEVisible;
            this.barCheckP.Checked = this.pumpRunViewChart1.QPVisble;
            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)}%";
            }
        }
@@ -321,13 +329,13 @@
        //效率线
        private void barCheckE_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            //this.pumpRunViewChart1.SetEQVisible
            this.pumpRunViewChart1.QEVisible = this.barCheckE.Checked;
        }
        //功率线
        private void barCheckP_CheckedChanged(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            this.pumpRunViewChart1.QPVisble = this.barCheckP.Checked;
        }
        //设置坐标轴