Shuxia Ning
2024-12-24 28999ee3f86d70c5be79f6f6a686c59e56bcad32
Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0
已修改20个文件
已添加1个文件
760 ■■■■■ 文件已修改
Desktop/HStation.Desktop.Xhs.Core/Program.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Hydro/HStation.Hydro.Core/HStation.Hydro.Core.csproj 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Hydro/Yw.Hydro.Core/Yw.Hydro.Core.csproj 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/01-property/SimulationPropertyCtrl.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/05-function/SimulationFunctionCtrl.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/02-feat/SimulationSinglePumpFeatCtrl.cs 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/02-feat/SimulationSinglePumpFeatDlg.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/03-analy/SimulationPumpAnalyChartCtrl.Designer.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/03-analy/SimulationPumpAnalyChartCtrl.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/04-working/SimulationPumpSingleWorkingChartCtrl.cs 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/05-extensions/HydroModelInfoExtensions.cs 235 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/05-extensions/HydroParterInfoExtensions.cs 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-visual/02-tank/HydroTankListCtrl.Designer.cs 150 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-visual/02-tank/HydroTankListCtrl.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-visual/03-waterbox/HydroWaterboxListCtrl.Designer.cs 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-visual/03-waterbox/HydroWaterboxListCtrl.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/12-monitor/05-analy/HydroWorkingMonitorAnalyListCtrl.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/18-loss/01-curve/HydroSingleWorkingLossCurveCtrl.cs 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/19-pump/00-core/HydroPumpCurveColorHelper.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Desktop/HStation.Desktop.Xhs.Core/Program.cs
@@ -29,11 +29,11 @@
                System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("zh-Hans");
                //处理未捕获的异常
                //Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
                Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
                //处理UI线程异常
                //Application.ThreadException += Application_ThreadException;
                Application.ThreadException += Application_ThreadException;
                //处理非UI线程异常
                //AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
                AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
Hydro/HStation.Hydro.Core/HStation.Hydro.Core.csproj
@@ -7,7 +7,7 @@
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Yw.Service.Hydro.Core" Version="3.8.9" />
    <PackageReference Include="Yw.Service.Hydro.Core" Version="3.9.0" />
  </ItemGroup>
  <ItemGroup>
Hydro/Yw.Hydro.Core/Yw.Hydro.Core.csproj
@@ -8,7 +8,7 @@
  <ItemGroup>
    <PackageReference Include="Yw.Geometry.Core" Version="3.2.9" />
    <PackageReference Include="Yw.Service.Hydro.Core" Version="3.8.6" />
    <PackageReference Include="Yw.Service.Hydro.Core" Version="3.9.0" />
  </ItemGroup>
  <ItemGroup>
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/01-property/SimulationPropertyCtrl.cs
@@ -59,7 +59,7 @@
        /// </summary>
        public event Action<HydroVisualInfo> FlowEffectPropertyValueChangedEvent;
        #endregion äº‹ä»¶é›†
        #endregion
        #region å±žæ€§èµ‹å€¼
@@ -81,7 +81,12 @@
            set { this.hydroVisualPropertyCtrl1.SelectedObject = value; }
        }
        #endregion å±žæ€§èµ‹å€¼
        /// <summary>
        /// è®¡ç®—结果
        /// </summary>
        public Func<HydroCalcuResult> CalcuResult { get; set; }
        #endregion
        #region å±žæ€§æ›´æ–°
@@ -115,7 +120,7 @@
            this.hydroVisualPropertyCtrl1.UpdateRows();
        }
        #endregion å±žæ€§æ›´æ–°
        #endregion
        #region äº‹ä»¶å®žçް
@@ -455,7 +460,7 @@
                            pumpViewModel.UpdateProperty();
                            this.hydroVisualPropertyCtrl1.UpdateRows();
                        };
                        dlg.SetBindingData(pumpViewModel);
                        dlg.SetBindingData(pumpViewModel, this.CalcuResult?.Invoke());
                        dlg.ShowDialog();
                    }
                    break;
@@ -512,7 +517,7 @@
            }
        }
        #endregion äº‹ä»¶å®žçް
        #endregion
        #region äº‹ä»¶ç©¿é€
@@ -560,6 +565,8 @@
            this.FlowEffectPropertyValueChangedEvent?.Invoke(vm?.Vmo);
        }
        #endregion äº‹ä»¶ç©¿é€
        #endregion
    }
}
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/05-function/SimulationFunctionCtrl.cs
@@ -279,7 +279,8 @@
                }
            }
            var overlay = this.ShowOverlay();
            WaitFormHelper.ShowWaitForm(this.FindForm(), "正在加载模型数据,请稍后...");
            //var overlay = this.ShowOverlay();
            if (!_gettingHydroInfoDict.TryAdd(key, true))
            {
                _gettingHydroInfoDict[key] = true;
@@ -303,8 +304,8 @@
            //var hydroInfo = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance.GetByID(relation.ModelID);
            var hydroInfo = await HStation.BLL.XhsHydroInfo.GetByID(relation.ModelID);
            _gettingHydroInfoDict[key] = false;
            overlay.Close();
            //overlay.Close();
            WaitFormHelper.HideWaitForm();
            return hydroInfo;
        }
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs
@@ -1,4 +1,5 @@
using Castle.Core.Logging;
using DevExpress.CodeParser;
using DevExpress.Diagram.Core.Native;
using DevExpress.Mvvm.Native;
using DevExpress.Utils.MVVM;
@@ -236,13 +237,13 @@
            }
            if (_bimfaceCtrl == null)
            {
                var overlay = this.ShowOverlay();
                _bimfaceCtrl = new SimulationBimfaceCtrl();
                _bimfaceCtrl.Dock = DockStyle.Fill;
                WaitFormHelper.ShowWaitForm(this.FindForm(), "正在加载模型,请稍后...");
                await _bimfaceCtrl.InitialData(_project, _projectSite);
                _bimfaceCtrl.LoadCompletedEvent += () =>
                {//view加载完成事件
                    overlay.Close();
                    WaitFormHelper.HideWaitForm();
                    this.barCkDecorator.Checked = false;
                    this.barCkGrading.Checked = true;
                };
@@ -320,6 +321,7 @@
                _propertyCtrl = new SimulationPropertyCtrl();
                _propertyCtrl.Dock = DockStyle.Fill;
                _propertyCtrl.AllowEdit = true;
                _propertyCtrl.CalcuResult = () => GetCalcuResult();
                _propertyCtrl.HydroViewEvent += (visual) =>
                {
                    SelectVisual(visual, eSimulationVisualSource.Property);
@@ -1929,7 +1931,7 @@
                return;
            }
            var monitorHelper = GetMonitorHelper();
            var allMonitorList = await monitorHelper.GetAll();
            var allMonitorList = await monitorHelper.GetAnalyseList();
            var dlg = new SetHydroMonitorAnalyseListDlg();
            dlg.ReloadDataEvent += async (list) =>
            {
@@ -2691,7 +2693,7 @@
                this.docPnlBottom.Text = "监测分析";
                this.docPnlBottom.Height = 350;
            }
            var allMontorList = await GetMonitorList();
            var allMontorList = await GetMonitorAnalyseList();
            if (allWorkingList == null || allWorkingList.Count < 1)
            {
                monitorAnalyListCtrl.SetBindingData(_hydroInfo, allMontorList, GetCalcuResult());
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/02-feat/SimulationSinglePumpFeatCtrl.cs
@@ -12,6 +12,7 @@
using System.Windows.Forms;
using Yw.Geometry;
using Yw.Pump;
using Yw.Vmo;
using Yw.WinFrmUI.Phart;
namespace HStation.WinFrmUI
@@ -35,12 +36,19 @@
        private Yw.Model.HydroModelInfo _hydroInfo = null;
        private Yw.Model.HydroPumpInfo _pumpInfo = null;
        private HydroCalcuResult _calcuResult = null;
        private double _head = 0;//
        /// <summary>
        /// ç»‘定数据
        /// </summary>
        public void SetBindingData(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroPumpInfo pumpInfo)
        public void SetBindingData
            (
                Yw.Model.HydroModelInfo hydroInfo,
                Yw.Model.HydroPumpInfo pumpInfo,
                HydroCalcuResult calcuResult
            )
        {
            if (hydroInfo == null)
            {
@@ -52,10 +60,32 @@
            }
            _hydroInfo = hydroInfo;
            _pumpInfo = pumpInfo;
            _calcuResult = calcuResult;
            _head = _hydroInfo.GetHead();
            this.hydroSinglePumpListExtendGridCtrl1.SetBindingData(pumpInfo);
            var allStateList = this.hydroSinglePumpListExtendGridCtrl1.GetStateList();
            var vm = CreateViewModel(allStateList);
            this.pumpOperationChart1.SetBindingData(vm);
            if (calcuResult != null)
            {
                var allCalcuVisualDict = calcuResult.GetVisualDict();
                var calcuVisualResult = allCalcuVisualDict?.GetValue(pumpInfo.Code) as HydroCalcuPumpResult;
                if (calcuVisualResult != null)
                {
                    if (calcuVisualResult.CalcuQ.HasValue)
                    {
                        this.txtDesignQ.EditValue = Math.Round(calcuVisualResult.CalcuQ.Value, 1);
                    }
                    if (calcuVisualResult.CalcuH.HasValue)
                    {
                        this.txtDesignH.EditValue = Math.Round(calcuVisualResult.CalcuH.Value, 2);
                    }
                    if (calcuVisualResult.CalcuQ.HasValue && calcuVisualResult.CalcuH.HasValue)
                    {
                        Design();
                    }
                }
            }
        }
        //状态改变事件
@@ -184,6 +214,12 @@
        //设计点
        private void btnDesign_Click(object sender, EventArgs e)
        {
            Design();
        }
        //设计
        private void Design()
        {
            var qtext = this.txtDesignQ.Text.Trim();
            if (string.IsNullOrEmpty(qtext))
            {
@@ -198,7 +234,7 @@
            }
            var q = double.Parse(qtext);
            var h = double.Parse(htext);
            this.pumpOperationChart1.SetDesignPoint(q, h);
            this.pumpOperationChart1.SetDesignPoint(q, h, _head);
        }
        /// <summary>
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/02-feat/SimulationSinglePumpFeatDlg.cs
@@ -22,21 +22,26 @@
        /// <summary>
        /// ç»‘定数据
        /// </summary>
        public void SetBindingData(HydroPumpViewModel pumpViewModel)
        public void SetBindingData(HydroPumpViewModel pumpViewModel, HydroCalcuResult calcuResult)
        {
            if (pumpViewModel == null)
            {
                return;
            }
            SetBindingData(pumpViewModel.HydroInfo, pumpViewModel.Vmo);
            SetBindingData(pumpViewModel.HydroInfo, pumpViewModel.Vmo, calcuResult);
        }
        /// <summary>
        /// ç»‘定数据
        /// </summary>
        public void SetBindingData(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroPumpInfo pumpInfo)
        public void SetBindingData
            (
                Yw.Model.HydroModelInfo hydroInfo,
                Yw.Model.HydroPumpInfo pumpInfo,
                HydroCalcuResult calcuResult
            )
        {
            this.simulationSinglePumpFeatCtrl1.SetBindingData(hydroInfo, pumpInfo);
            this.simulationSinglePumpFeatCtrl1.SetBindingData(hydroInfo, pumpInfo, calcuResult);
        }
        private void SimulationPumpFeatDlg_FormClosing(object sender, FormClosingEventArgs e)
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/03-analy/SimulationPumpAnalyChartCtrl.Designer.cs
@@ -112,7 +112,7 @@
            barTxtQ.Alignment = DevExpress.XtraBars.BarItemLinkAlignment.Right;
            barTxtQ.Caption = "流量:";
            barTxtQ.Edit = repositoryItemTextEdit1;
            barTxtQ.EditWidth = 80;
            barTxtQ.EditWidth = 100;
            barTxtQ.Id = 3;
            barTxtQ.Name = "barTxtQ";
            barTxtQ.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph;
@@ -129,7 +129,7 @@
            barTxtH.Alignment = DevExpress.XtraBars.BarItemLinkAlignment.Right;
            barTxtH.Caption = "扬程:";
            barTxtH.Edit = repositoryItemTextEdit2;
            barTxtH.EditWidth = 80;
            barTxtH.EditWidth = 100;
            barTxtH.Id = 5;
            barTxtH.Name = "barTxtH";
            barTxtH.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph;
@@ -146,7 +146,7 @@
            barTxtP.Alignment = DevExpress.XtraBars.BarItemLinkAlignment.Right;
            barTxtP.Caption = "功率:";
            barTxtP.Edit = repositoryItemTextEdit3;
            barTxtP.EditWidth = 80;
            barTxtP.EditWidth = 100;
            barTxtP.Id = 6;
            barTxtP.Name = "barTxtP";
            barTxtP.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph;
@@ -163,7 +163,7 @@
            barTxtE.Alignment = DevExpress.XtraBars.BarItemLinkAlignment.Right;
            barTxtE.Caption = "效率:";
            barTxtE.Edit = repositoryItemTextEdit4;
            barTxtE.EditWidth = 80;
            barTxtE.EditWidth = 100;
            barTxtE.Id = 7;
            barTxtE.Name = "barTxtE";
            barTxtE.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph;
@@ -181,7 +181,7 @@
            barDockControlTop.Dock = DockStyle.Top;
            barDockControlTop.Location = new Point(0, 0);
            barDockControlTop.Manager = barManager1;
            barDockControlTop.Size = new Size(818, 24);
            barDockControlTop.Size = new Size(907, 24);
            // 
            // barDockControlBottom
            // 
@@ -189,7 +189,7 @@
            barDockControlBottom.Dock = DockStyle.Bottom;
            barDockControlBottom.Location = new Point(0, 535);
            barDockControlBottom.Manager = barManager1;
            barDockControlBottom.Size = new Size(818, 0);
            barDockControlBottom.Size = new Size(907, 0);
            // 
            // barDockControlLeft
            // 
@@ -203,7 +203,7 @@
            // 
            barDockControlRight.CausesValidation = false;
            barDockControlRight.Dock = DockStyle.Right;
            barDockControlRight.Location = new Point(818, 24);
            barDockControlRight.Location = new Point(907, 24);
            barDockControlRight.Manager = barManager1;
            barDockControlRight.Size = new Size(0, 511);
            // 
@@ -213,7 +213,10 @@
            pumpRunViewChart1.Location = new Point(0, 24);
            pumpRunViewChart1.Margin = new Padding(2, 2, 2, 2);
            pumpRunViewChart1.Name = "pumpRunViewChart1";
            pumpRunViewChart1.Size = new Size(818, 511);
            pumpRunViewChart1.QEVisible = true;
            pumpRunViewChart1.QPVisble = true;
            pumpRunViewChart1.RunPointVisible = true;
            pumpRunViewChart1.Size = new Size(907, 511);
            pumpRunViewChart1.TabIndex = 4;
            // 
            // SimulationPumpAnalyChartCtrl
@@ -226,7 +229,7 @@
            Controls.Add(barDockControlBottom);
            Controls.Add(barDockControlTop);
            Name = "SimulationPumpAnalyChartCtrl";
            Size = new Size(818, 535);
            Size = new Size(907, 535);
            ((ISupportInitialize)barManager1).EndInit();
            ((ISupportInitialize)repositoryItemTextEdit1).EndInit();
            ((ISupportInitialize)repositoryItemTextEdit2).EndInit();
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/03-analy/SimulationPumpAnalyChartCtrl.cs
@@ -20,6 +20,7 @@
        public SimulationPumpAnalyChartCtrl()
        {
            InitializeComponent();
            this.pumpRunViewChart1.RunPointSelectedEvent += PumpRunViewChart1_RunPointSelectedEvent;
        }
        private Yw.Model.HydroModelInfo _hydroInfo = null;//水力信息
@@ -344,6 +345,11 @@
            this.pumpRunViewChart1.SetChartAxis();
        }
        private void PumpRunViewChart1_RunPointSelectedEvent(PumpRunViewItemViewModel obj)
        {
            SetCurrent(obj);
        }
    }
}
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/11-pump/04-working/SimulationPumpSingleWorkingChartCtrl.cs
@@ -97,92 +97,13 @@
            vm.CurveName = $"装置线";
            vm.Color = Color.Black;
            var head = _hydroInfo.GetHead();
            var pipeQ = _hydroInfo.GetPipeQ(_allCalcuResultVisualDict);
            var pipeH = _hydroInfo.GetPipeHead(_allCalcuResultVisualDict);
            double startHeadValue = 0;
            var startSourceMonitor = _allMonitorList?
                .Matching(HydroVisualCalcuProp.CalcuHead, new List<string>()
                { HStation.Xhs.Flags.水源,HStation.Xhs.Flags.始端,HStation.Xhs.Flags.默认});
            if (startSourceMonitor == null)
            {
                startSourceMonitor = _allMonitorList?
                .Matching(HydroVisualCalcuProp.CalcuHead, new List<string>()
                { HStation.Xhs.Flags.水源,HStation.Xhs.Flags.始端});
            }
            if (startSourceMonitor != null)
            {
                var startSourceCalcuResult = _allCalcuResultVisualDict?.GetValue(startSourceMonitor.Relation);
                if (startSourceCalcuResult != null)
                {
                    var startHead = startSourceCalcuResult.GetCalcuValue(startSourceMonitor.PropName);
                    if (startHead.HasValue)
                    {
                        startHeadValue = startHead.Value;
                    }
                }
            }
            var endSourceMonitor = _allMonitorList?
            .Matching(HydroVisualCalcuProp.CalcuHead, new List<string>()
            { HStation.Xhs.Flags.水源,HStation.Xhs.Flags.末端,HStation.Xhs.Flags.默认});
            if (endSourceMonitor == null)
            {
                endSourceMonitor = _allMonitorList?
                            .Matching(HydroVisualCalcuProp.CalcuHead, new List<string>()
                            { HStation.Xhs.Flags.水源,HStation.Xhs.Flags.末端});
            }
            if (endSourceMonitor != null)
            {
                var endSouceCalcuResult = _allCalcuResultVisualDict?.GetValue(endSourceMonitor.Relation);
                if (endSouceCalcuResult != null)
                {
                    var endHead = endSouceCalcuResult.GetCalcuValue(endSourceMonitor.PropName);
                    if (endHead.HasValue)
                    {
                        vm.StartH = Math.Round(endHead.Value - startHeadValue, 2);
                    }
                }
            }
            var outPipeFlowMonitor = _allMonitorList?.Matching(HydroVisualCalcuProp.CalcuFlow, new List<string>()
                            { HStation.Xhs.Flags.总管,HStation.Xhs.Flags.出口,HStation.Xhs.Flags.默认});
            if (outPipeFlowMonitor == null)
            {
                outPipeFlowMonitor = _allMonitorList?.Matching(HydroVisualCalcuProp.CalcuFlow, new List<string>()
                        { HStation.Xhs.Flags.总管,HStation.Xhs.Flags.出口});
            }
            if (outPipeFlowMonitor != null)
            {
                var outPipeFlowCalcuResult = _allCalcuResultVisualDict?.GetValue(outPipeFlowMonitor.Relation);
                if (outPipeFlowCalcuResult != null)
                {
                    var outPipeFlow = outPipeFlowCalcuResult.GetCalcuValue(outPipeFlowMonitor.PropName);
                    if (outPipeFlow.HasValue)
                    {
                        vm.PipeQ = Math.Round(outPipeFlow.Value, 1);
                    }
                }
            }
            var outPipeHeadMonitor = _allMonitorList?.Matching(HydroVisualCalcuProp.CalcuHead, new List<string>()
                            { HStation.Xhs.Flags.总管,HStation.Xhs.Flags.出口,HStation.Xhs.Flags.默认});
            if (outPipeHeadMonitor == null)
            {
                outPipeHeadMonitor = _allMonitorList?.Matching(HydroVisualCalcuProp.CalcuHead, new List<string>()
                            { HStation.Xhs.Flags.总管,HStation.Xhs.Flags.出口});
            }
            if (outPipeHeadMonitor != null)
            {
                var outPipeHeadCalcuResult = _allCalcuResultVisualDict?.GetValue(outPipeHeadMonitor.Relation);
                if (outPipeHeadCalcuResult != null)
                {
                    var outPipeHead = outPipeHeadCalcuResult.GetCalcuValue(outPipeHeadMonitor.PropName);
                    if (outPipeHead.HasValue)
                    {
                        vm.PipeH = Math.Round(outPipeHead.Value - startHeadValue, 2);
                    }
                }
            }
            vm.StartH = head;
            vm.PipeQ = pipeQ ?? 0;
            vm.PipeH = pipeH ?? 0;
            if (_hydroInfo.Pumps != null && _hydroInfo.Pumps.Count > 0)
            {
WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/05-extensions/HydroModelInfoExtensions.cs
@@ -1,4 +1,5 @@
using Yw.EPAnet;
using DevExpress.Drawing.Internal.Interop;
using Yw.EPAnet;
using Yw.Hydro;
using Yw.Model;
@@ -15,9 +16,8 @@
        private const double _pipe_diameter_default = 500;//管道默认直径
        private const double _pipe_roughness_default = 110;//管道默认粗糙系数
        private const double _pipe_minorloss_default = 0.1;//管道默认粗糙系数
        //阀门默认局阻系数
        private const double _valve_minorloss_default = 0.3d;
        private const double _valve_minorloss_default = 0.3d; //阀门默认局阻系数
        private const double _resistance_minorloss_default = 9d;//阻件默认局阻系数
        /// <summary>
        /// ä¿®å¤å‚æ•°
@@ -175,10 +175,237 @@
                }
            }
            //阻件
            var allResistanceList = hydroInfo.GetAllResistances();
            if (allResistanceList != null && allResistanceList.Count > 0)
            {
                foreach (var resistance in allResistanceList)
                {
                    if (resistance.MinorLoss <= 0)
                    {
                        resistance.MinorLoss = _resistance_minorloss_default;
                        resistance.UpdatePropStatus(nameof(resistance.MinorLoss), ePropStatus.Lack, $"局阻系数缺省,使用默认值【{_resistance_minorloss_default}】修复");
                    }
                    var startNode = allNodes.Find(x => x.Code == resistance.StartCode);
                    if (startNode != null)
                    {
                        var startPipe = allLinks.Find(x => x.EndCode == startNode.Code) as Yw.Model.HydroPipeInfo;
                        if (startPipe != null)
                        {
                            resistance.Diameter = startPipe.Diameter;
                            resistance.UpdatePropStatus(nameof(resistance.Diameter), ePropStatus.Lack, $"直径使用上游管道【{startPipe.Code}】修复");
                        }
                        else
                        {
                            var endNode = allNodes.Find(x => x.Code == resistance.EndCode);
                            if (endNode != null)
                            {
                                var endPipe = allLinks.Find(x => x.StartCode == endNode.Code) as Yw.Model.HydroPipeInfo;
                                if (endPipe != null)
                                {
                                    resistance.Diameter = endPipe.Diameter;
                                    resistance.UpdatePropStatus(nameof(resistance.Diameter), ePropStatus.Lack, $"直径使用下游管道【{endPipe.Code}】修复");
                                }
                            }
                        }
                    }
                }
            }
        }
        #endregion
        #region è£…置计算
        /// <summary>
        /// èŽ·å–æ‰¬ç¨‹
        /// </summary>
        public static double GetHead(this Yw.Model.HydroModelInfo hydroInfo)
        {
            if (hydroInfo == null)
            {
                return default;
            }
            double startHeadValue = 0;
            var allSourceList = hydroInfo.GetAllSources();
            if (allSourceList != null && allSourceList.Count > 0)
            {
                var startSource = allSourceList.Matching(new List<string>()
                {
                    Yw.Hydro.Flags.水源,
                    Yw.Hydro.Flags.始端,
                    Yw.Hydro.Flags.默认
                });
                if (startSource == null)
                {
                    startSource = allSourceList.Matching(new List<string>()
                    {
                        Yw.Hydro.Flags.水源,
                        Yw.Hydro.Flags.始端
                    });
                }
                if (startSource != null)
                {
                    if (startSource is HydroTankInfo tank)
                    {
                        startHeadValue = tank.PoolElev + tank.InitLevel;
                    }
                }
            }
            double endHeadValue = 0;
            var allNodeList = hydroInfo.GetAllNodes();
            if (allNodeList != null && allNodeList.Count > 0)
            {
                var endSource = allNodeList.Matching(new List<string>()
                {
                    Yw.Hydro.Flags.水源,
                    Yw.Hydro.Flags.末端,
                    Yw.Hydro.Flags.默认
                });
                if (endSource == null)
                {
                    endSource = allSourceList.Matching(new List<string>()
                    {
                        Yw.Hydro.Flags.水源,
                        Yw.Hydro.Flags.末端
                    });
                }
                if (endSource != null)
                {
                    if (endSource is HydroTankInfo tank)
                    {
                        endHeadValue = tank.PoolElev + tank.InitLevel;
                    }
                    else if (endSource is HydroEmitterInfo emitter)
                    {
                        endHeadValue = emitter.Elev;
                    }
                }
            }
            return endHeadValue - startHeadValue;
        }
        /// <summary>
        /// èŽ·å–æ€»ç®¡æµé‡
        /// </summary>
        public static double? GetPipeQ(this Yw.Model.HydroModelInfo hydroInfo, HydroCalcuResult calcuResult)
        {
            return GetPipeQ(hydroInfo, calcuResult?.GetVisualDict());
        }
        /// <summary>
        /// èŽ·å–æ€»ç®¡æµé‡
        /// </summary>
        public static double? GetPipeQ(this Yw.Model.HydroModelInfo hydroInfo, Dictionary<string, HydroCalcuVisualResult> allCalcuVisualDict)
        {
            if (hydroInfo == null)
            {
                return default;
            }
            if (allCalcuVisualDict == null || allCalcuVisualDict.Count < 1)
            {
                return default;
            }
            var allLinkList = hydroInfo.GetAllLinks();
            if (allLinkList == null || allLinkList.Count < 1)
            {
                return default;
            }
            var link = allLinkList.Matching(new List<string>()
            {
                Yw.Hydro.Flags.总管,
                Yw.Hydro.Flags.出口,
                Yw.Hydro.Flags.默认
            });
            if (link == null)
            {
                link = allLinkList.Matching(new List<string>()
                {
                    Yw.Hydro.Flags.总管,
                    Yw.Hydro.Flags.出口
                });
            }
            if (link == null)
            {
                return default;
            }
            var calcuVisualResult = allCalcuVisualDict.GetValue(link.Code);
            if (calcuVisualResult == null)
            {
                return default;
            }
            var calcuValue = calcuVisualResult.GetCalcuValue(Yw.Hydro.VisualCalcuProp.CalcuFlow);
            if (calcuValue == null)
            {
                return default;
            }
            return Math.Round(Math.Abs(calcuValue.Value), 1);
        }
        /// <summary>
        /// èŽ·å–æ€»ç®¡åŽ‹åŠ›ï¼ˆç»å¯¹åŽ‹åŠ›ï¼‰
        /// </summary>
        public static double? GetPipeHead(this Yw.Model.HydroModelInfo hydroInfo, HydroCalcuResult calcuResult)
        {
            return GetPipeHead(hydroInfo, calcuResult?.GetVisualDict());
        }
        /// <summary>
        /// èŽ·å–æ€»ç®¡åŽ‹åŠ›ï¼ˆç»å¯¹åŽ‹åŠ›ï¼‰
        /// </summary>
        public static double? GetPipeHead(this Yw.Model.HydroModelInfo hydroInfo, Dictionary<string, HydroCalcuVisualResult> allCalcuVisualDict)
        {
            if (hydroInfo == null)
            {
                return default;
            }
            if (allCalcuVisualDict == null || allCalcuVisualDict.Count < 1)
            {
                return default;
            }
            var allNodeList = hydroInfo.GetAllNodes();
            if (allNodeList == null || allNodeList.Count < 1)
            {
                return default;
            }
            var node = allNodeList.Matching(new List<string>()
            {
                Yw.Hydro.Flags.总管,
                Yw.Hydro.Flags.出口,
                Yw.Hydro.Flags.默认
            });
            if (node == null)
            {
                node = allNodeList.Matching(new List<string>()
                {
                    Yw.Hydro.Flags.总管,
                    Yw.Hydro.Flags.出口
                });
            }
            if (node == null)
            {
                return default;
            }
            var calcuVisualResult = allCalcuVisualDict.GetValue(node.Code);
            if (calcuVisualResult == null)
            {
                return default;
            }
            var calcuValue = calcuVisualResult.GetCalcuValue(Yw.Hydro.VisualCalcuProp.CalcuHead);
            if (calcuValue == null)
            {
                return default;
            }
            return Math.Round(calcuValue.Value, 2);
        }
        #endregion
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/05-extensions/HydroParterInfoExtensions.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Yw.Model;
namespace Yw.WinFrmUI
{
    /// <summary>
    ///
    /// </summary>
    public static class HydroParterInfoExtensions
    {
        /// <summary>
        /// åŒ¹é…
        /// </summary>
        public static HydroSourceInfo Matching(this List<HydroSourceInfo> allSourceList, List<string> flags)
        {
            if (allSourceList == null || allSourceList.Count < 1)
            {
                return default;
            }
            var sourceList = allSourceList.OrderBy(x => x.Flags.Distinct().Count()).ToList();
            return sourceList.Find(x => x.Flags.ContainsC(flags));
        }
        /// <summary>
        /// åŒ¹é…
        /// </summary>
        public static HydroNodeInfo Matching(this List<HydroNodeInfo> allNodeList, List<string> flags)
        {
            if (allNodeList == null || allNodeList.Count < 1)
            {
                return default;
            }
            var nodeList = allNodeList.OrderBy(x => x.Flags.Distinct().Count()).ToList();
            return nodeList.Find(x => x.Flags.ContainsC(flags));
        }
        /// <summary>
        /// åŒ¹é…
        /// </summary>
        public static HydroLinkInfo Matching(this List<HydroLinkInfo> allLinkList, List<string> flags)
        {
            if (allLinkList == null || allLinkList.Count < 1)
            {
                return default;
            }
            var linkList = allLinkList.OrderBy(x => x.Flags.Distinct().Count()).ToList();
            return linkList.Find(x => x.Flags.ContainsC(flags));
        }
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-visual/02-tank/HydroTankListCtrl.Designer.cs
@@ -29,37 +29,36 @@
        private void InitializeComponent()
        {
            components = new Container();
            ComponentResourceManager resources = new ComponentResourceManager(typeof(HydroTankListCtrl));
            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject();
            ComponentResourceManager resources = new ComponentResourceManager(typeof(HydroTankListCtrl));
            hydroTankViewModelBindingSource = new BindingSource(components);
            layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
            generalSearchAndSetCtrl1 = new GeneralSearchAndSetCtrl();
            gridControl1 = new DevExpress.XtraGrid.GridControl();
            gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView();
            colSet = new DevExpress.XtraGrid.Columns.GridColumn();
            repositoryItemButtonEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit();
            colDbLocked = new DevExpress.XtraGrid.Columns.GridColumn();
            colCode = new DevExpress.XtraGrid.Columns.GridColumn();
            colName = new DevExpress.XtraGrid.Columns.GridColumn();
            colCode = new DevExpress.XtraGrid.Columns.GridColumn();
            colModelType = new DevExpress.XtraGrid.Columns.GridColumn();
            colHasDb = new DevExpress.XtraGrid.Columns.GridColumn();
            colPoolElev = new DevExpress.XtraGrid.Columns.GridColumn();
            colInitLevel = new DevExpress.XtraGrid.Columns.GridColumn();
            colMinLevel = new DevExpress.XtraGrid.Columns.GridColumn();
            colMaxLevel = new DevExpress.XtraGrid.Columns.GridColumn();
            colDN = new DevExpress.XtraGrid.Columns.GridColumn();
            colMinVol = new DevExpress.XtraGrid.Columns.GridColumn();
            colCurve = new DevExpress.XtraGrid.Columns.GridColumn();
            colOverFlow = new DevExpress.XtraGrid.Columns.GridColumn();
            colHasDb = new DevExpress.XtraGrid.Columns.GridColumn();
            colDescription = new DevExpress.XtraGrid.Columns.GridColumn();
            colFlags = new DevExpress.XtraGrid.Columns.GridColumn();
            colCalcuPress = new DevExpress.XtraGrid.Columns.GridColumn();
            colCalcuHead = new DevExpress.XtraGrid.Columns.GridColumn();
            colCalcuDemand = new DevExpress.XtraGrid.Columns.GridColumn();
            colFlags = new DevExpress.XtraGrid.Columns.GridColumn();
            colDescription = new DevExpress.XtraGrid.Columns.GridColumn();
            colSet = new DevExpress.XtraGrid.Columns.GridColumn();
            repositoryItemButtonEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit();
            txtName = new DevExpress.XtraEditors.TextEdit();
            txtModelType = new DevExpress.XtraEditors.TextEdit();
            txtCode = new DevExpress.XtraEditors.TextEdit();
@@ -90,7 +89,7 @@
            // 
            // hydroTankViewModelBindingSource
            // 
            hydroTankViewModelBindingSource.DataSource = typeof(HydroElbowViewModel);
            hydroTankViewModelBindingSource.DataSource = typeof(HydroTankViewModel);
            // 
            // layoutControl1
            // 
@@ -129,31 +128,10 @@
            // 
            // gridView1
            // 
            gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colDbLocked, colName, colCode, colModelType, colPoolElev, colInitLevel, colMinLevel, colMaxLevel, colDN, colMinVol, colCurve, colOverFlow, colHasDb, colDescription, colFlags, colCalcuPress, colCalcuHead, colCalcuDemand, colSet });
            gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colDbLocked, colName, colCode, colModelType, colPoolElev, colInitLevel, colMinLevel, colMaxLevel, colDN, colMinVol, colOverFlow, colHasDb, colDescription, colFlags, colCalcuPress, colCalcuHead, colCalcuDemand, colSet });
            gridView1.GridControl = gridControl1;
            gridView1.Name = "gridView1";
            gridView1.RowCellClick += gridView1_RowCellClick;
            //
            // colSet
            //
            colSet.Caption = "设置";
            colSet.ColumnEdit = repositoryItemButtonEdit1;
            colSet.Fixed = DevExpress.XtraGrid.Columns.FixedStyle.Right;
            colSet.MaxWidth = 60;
            colSet.MinWidth = 60;
            colSet.Name = "colSet";
            colSet.Visible = true;
            colSet.VisibleIndex = 18;
            colSet.Width = 60;
            //
            // repositoryItemButtonEdit1
            //
            repositoryItemButtonEdit1.AutoHeight = false;
            editorButtonImageOptions1.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("editorButtonImageOptions1.SvgImage");
            editorButtonImageOptions1.SvgImageSize = new Size(20, 20);
            repositoryItemButtonEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "", -1, true, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "设置", "set", null, DevExpress.Utils.ToolTipAnchor.Default) });
            repositoryItemButtonEdit1.Name = "repositoryItemButtonEdit1";
            repositoryItemButtonEdit1.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor;
            // 
            // colDbLocked
            // 
@@ -166,16 +144,6 @@
            colDbLocked.VisibleIndex = 0;
            colDbLocked.Width = 40;
            // 
            // colCode
            //
            colCode.FieldName = "Code";
            colCode.MaxWidth = 150;
            colCode.MinWidth = 100;
            colCode.Name = "colCode";
            colCode.Visible = true;
            colCode.VisibleIndex = 2;
            colCode.Width = 100;
            //
            // colName
            // 
            colName.FieldName = "Name";
@@ -186,6 +154,16 @@
            colName.VisibleIndex = 1;
            colName.Width = 100;
            // 
            // colCode
            //
            colCode.FieldName = "Code";
            colCode.MaxWidth = 150;
            colCode.MinWidth = 100;
            colCode.Name = "colCode";
            colCode.Visible = true;
            colCode.VisibleIndex = 2;
            colCode.Width = 100;
            //
            // colModelType
            // 
            colModelType.FieldName = "ModelType";
@@ -195,16 +173,6 @@
            colModelType.Visible = true;
            colModelType.VisibleIndex = 3;
            colModelType.Width = 100;
            //
            // colHasDb
            //
            colHasDb.FieldName = "HasDb";
            colHasDb.MaxWidth = 40;
            colHasDb.MinWidth = 40;
            colHasDb.Name = "colHasDb";
            colHasDb.Visible = true;
            colHasDb.VisibleIndex = 12;
            colHasDb.Width = 40;
            // 
            // colPoolElev
            // 
@@ -266,16 +234,6 @@
            colMinVol.VisibleIndex = 9;
            colMinVol.Width = 100;
            // 
            // colCurve
            //
            colCurve.FieldName = "Curve";
            colCurve.MaxWidth = 100;
            colCurve.MinWidth = 100;
            colCurve.Name = "colCurve";
            colCurve.Visible = true;
            colCurve.VisibleIndex = 10;
            colCurve.Width = 100;
            //
            // colOverFlow
            // 
            colOverFlow.FieldName = "OverFlow";
@@ -283,8 +241,37 @@
            colOverFlow.MinWidth = 60;
            colOverFlow.Name = "colOverFlow";
            colOverFlow.Visible = true;
            colOverFlow.VisibleIndex = 11;
            colOverFlow.VisibleIndex = 10;
            colOverFlow.Width = 60;
            //
            // colHasDb
            //
            colHasDb.FieldName = "HasDb";
            colHasDb.MaxWidth = 40;
            colHasDb.MinWidth = 40;
            colHasDb.Name = "colHasDb";
            colHasDb.Visible = true;
            colHasDb.VisibleIndex = 11;
            colHasDb.Width = 40;
            //
            // colDescription
            //
            colDescription.FieldName = "Description";
            colDescription.MinWidth = 100;
            colDescription.Name = "colDescription";
            colDescription.Visible = true;
            colDescription.VisibleIndex = 13;
            colDescription.Width = 100;
            //
            // colFlags
            //
            colFlags.FieldName = "Flags";
            colFlags.MaxWidth = 200;
            colFlags.MinWidth = 100;
            colFlags.Name = "colFlags";
            colFlags.Visible = true;
            colFlags.VisibleIndex = 12;
            colFlags.Width = 100;
            // 
            // colCalcuPress
            // 
@@ -296,7 +283,7 @@
            colCalcuPress.MinWidth = 100;
            colCalcuPress.Name = "colCalcuPress";
            colCalcuPress.Visible = true;
            colCalcuPress.VisibleIndex = 15;
            colCalcuPress.VisibleIndex = 14;
            colCalcuPress.Width = 100;
            // 
            // colCalcuHead
@@ -309,7 +296,7 @@
            colCalcuHead.MinWidth = 100;
            colCalcuHead.Name = "colCalcuHead";
            colCalcuHead.Visible = true;
            colCalcuHead.VisibleIndex = 16;
            colCalcuHead.VisibleIndex = 15;
            colCalcuHead.Width = 100;
            // 
            // colCalcuDemand
@@ -322,27 +309,29 @@
            colCalcuDemand.MinWidth = 110;
            colCalcuDemand.Name = "colCalcuDemand";
            colCalcuDemand.Visible = true;
            colCalcuDemand.VisibleIndex = 17;
            colCalcuDemand.VisibleIndex = 16;
            colCalcuDemand.Width = 110;
            // 
            // colFlags
            // colSet
            // 
            colFlags.FieldName = "Flags";
            colFlags.MaxWidth = 200;
            colFlags.MinWidth = 100;
            colFlags.Name = "colFlags";
            colFlags.Visible = true;
            colFlags.VisibleIndex = 13;
            colFlags.Width = 100;
            colSet.Caption = "设置";
            colSet.ColumnEdit = repositoryItemButtonEdit1;
            colSet.Fixed = DevExpress.XtraGrid.Columns.FixedStyle.Right;
            colSet.MaxWidth = 60;
            colSet.MinWidth = 60;
            colSet.Name = "colSet";
            colSet.Visible = true;
            colSet.VisibleIndex = 17;
            colSet.Width = 60;
            // 
            // colDescription
            // repositoryItemButtonEdit1
            // 
            colDescription.FieldName = "Description";
            colDescription.MinWidth = 100;
            colDescription.Name = "colDescription";
            colDescription.Visible = true;
            colDescription.VisibleIndex = 14;
            colDescription.Width = 100;
            repositoryItemButtonEdit1.AutoHeight = false;
            editorButtonImageOptions1.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("editorButtonImageOptions1.SvgImage");
            editorButtonImageOptions1.SvgImageSize = new Size(20, 20);
            repositoryItemButtonEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "", -1, true, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "设置", "set", null, DevExpress.Utils.ToolTipAnchor.Default) });
            repositoryItemButtonEdit1.Name = "repositoryItemButtonEdit1";
            repositoryItemButtonEdit1.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor;
            // 
            // txtName
            // 
@@ -492,7 +481,6 @@
        private DevExpress.XtraGrid.Columns.GridColumn colMaxLevel;
        private DevExpress.XtraGrid.Columns.GridColumn colDN;
        private DevExpress.XtraGrid.Columns.GridColumn colMinVol;
        private DevExpress.XtraGrid.Columns.GridColumn colCurve;
        private DevExpress.XtraGrid.Columns.GridColumn colOverFlow;
        private DevExpress.XtraGrid.Columns.GridColumn colCalcuPress;
        private DevExpress.XtraGrid.Columns.GridColumn colCalcuHead;
WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-visual/02-tank/HydroTankListCtrl.cs
@@ -302,7 +302,6 @@
            this.colMaxLevel.Visible = false;
            this.colDN.Visible = false;
            this.colMinVol.Visible = false;
            this.colCurve.Visible = false;
            this.colOverFlow.Visible = false;
            this.colCalcuPress.Visible = false;
            this.colCalcuHead.Visible = false;
@@ -329,7 +328,6 @@
            this.colMaxLevel.Visible = true;
            this.colDN.Visible = true;
            this.colMinVol.Visible = true;
            this.colCurve.Visible = true;
            this.colOverFlow.Visible = true;
            this.colCalcuPress.Visible = false;
            this.colCalcuHead.Visible = false;
@@ -356,7 +354,6 @@
            this.colMaxLevel.Visible = true;
            this.colDN.Visible = true;
            this.colMinVol.Visible = true;
            this.colCurve.Visible = true;
            this.colOverFlow.Visible = true;
            this.colCalcuPress.Visible = true;
            this.colCalcuHead.Visible = true;
@@ -383,7 +380,6 @@
            this.colMaxLevel.Visible = true;
            this.colDN.Visible = true;
            this.colMinVol.Visible = true;
            this.colCurve.Visible = true;
            this.colOverFlow.Visible = true;
            this.colCalcuPress.Visible = false;
            this.colCalcuHead.Visible = false;
@@ -410,7 +406,6 @@
            this.colMaxLevel.Visible = true;
            this.colDN.Visible = true;
            this.colMinVol.Visible = true;
            this.colCurve.Visible = true;
            this.colOverFlow.Visible = true;
            this.colCalcuPress.Visible = true;
            this.colCalcuHead.Visible = true;
WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-visual/03-waterbox/HydroWaterboxListCtrl.Designer.cs
@@ -29,12 +29,12 @@
        private void InitializeComponent()
        {
            components = new Container();
            ComponentResourceManager resources = new ComponentResourceManager(typeof(HydroWaterboxListCtrl));
            DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject();
            DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject();
            ComponentResourceManager resources = new ComponentResourceManager(typeof(HydroWaterboxListCtrl));
            gridControl1 = new DevExpress.XtraGrid.GridControl();
            hydroWaterboxViewModelBindingSource = new BindingSource(components);
            gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView();
@@ -49,10 +49,10 @@
            colMaxLevel = new DevExpress.XtraGrid.Columns.GridColumn();
            colDN = new DevExpress.XtraGrid.Columns.GridColumn();
            colMinVol = new DevExpress.XtraGrid.Columns.GridColumn();
            colCurve = new DevExpress.XtraGrid.Columns.GridColumn();
            colOverFlow = new DevExpress.XtraGrid.Columns.GridColumn();
            colFlags = new DevExpress.XtraGrid.Columns.GridColumn();
            colDescription = new DevExpress.XtraGrid.Columns.GridColumn();
            colCalcuL = new DevExpress.XtraGrid.Columns.GridColumn();
            colSet = new DevExpress.XtraGrid.Columns.GridColumn();
            repositoryItemButtonEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit();
            layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
@@ -67,7 +67,7 @@
            layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem8 = new DevExpress.XtraLayout.LayoutControlItem();
            colCalcuL = new DevExpress.XtraGrid.Columns.GridColumn();
            colVolCurve = new DevExpress.XtraGrid.Columns.GridColumn();
            ((ISupportInitialize)gridControl1).BeginInit();
            ((ISupportInitialize)hydroWaterboxViewModelBindingSource).BeginInit();
            ((ISupportInitialize)gridView1).BeginInit();
@@ -103,7 +103,7 @@
            // 
            // gridView1
            // 
            gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colDbLocked, colCode, colName, colModelType, colHasDb, colPoolElev, colInitLevel, colMinLevel, colMaxLevel, colDN, colMinVol, colCurve, colOverFlow, colFlags, colDescription, colCalcuL, colSet });
            gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colDbLocked, colCode, colName, colModelType, colHasDb, colPoolElev, colInitLevel, colMinLevel, colMaxLevel, colDN, colMinVol, colVolCurve, colOverFlow, colFlags, colDescription, colCalcuL, colSet });
            gridView1.GridControl = gridControl1;
            gridView1.Name = "gridView1";
            gridView1.RowCellClick += gridView1_RowCellClick;
@@ -219,16 +219,6 @@
            colMinVol.VisibleIndex = 9;
            colMinVol.Width = 90;
            // 
            // colCurve
            //
            colCurve.FieldName = "Curve";
            colCurve.MaxWidth = 80;
            colCurve.MinWidth = 80;
            colCurve.Name = "colCurve";
            colCurve.Visible = true;
            colCurve.VisibleIndex = 10;
            colCurve.Width = 80;
            //
            // colOverFlow
            // 
            colOverFlow.FieldName = "OverFlow";
@@ -236,7 +226,7 @@
            colOverFlow.MinWidth = 60;
            colOverFlow.Name = "colOverFlow";
            colOverFlow.Visible = true;
            colOverFlow.VisibleIndex = 11;
            colOverFlow.VisibleIndex = 10;
            colOverFlow.Width = 60;
            // 
            // colFlags
@@ -257,6 +247,19 @@
            colDescription.Visible = true;
            colDescription.VisibleIndex = 14;
            colDescription.Width = 100;
            //
            // colCalcuL
            //
            colCalcuL.FieldName = "CalcuL";
            colCalcuL.Fixed = DevExpress.XtraGrid.Columns.FixedStyle.Right;
            colCalcuL.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("colCalcuL.ImageOptions.SvgImage");
            colCalcuL.ImageOptions.SvgImageSize = new Size(16, 16);
            colCalcuL.MaxWidth = 100;
            colCalcuL.MinWidth = 100;
            colCalcuL.Name = "colCalcuL";
            colCalcuL.Visible = true;
            colCalcuL.VisibleIndex = 15;
            colCalcuL.Width = 100;
            // 
            // colSet
            // 
@@ -407,18 +410,15 @@
            layoutControlItem8.TextSize = new Size(0, 0);
            layoutControlItem8.TextVisible = false;
            // 
            // colCalcuL
            // colVolCurve
            // 
            colCalcuL.FieldName = "CalcuL";
            colCalcuL.Fixed = DevExpress.XtraGrid.Columns.FixedStyle.Right;
            colCalcuL.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("colCalcuL.ImageOptions.SvgImage");
            colCalcuL.ImageOptions.SvgImageSize = new Size(16, 16);
            colCalcuL.MaxWidth = 100;
            colCalcuL.MinWidth = 100;
            colCalcuL.Name = "colCalcuL";
            colCalcuL.Visible = true;
            colCalcuL.VisibleIndex = 15;
            colCalcuL.Width = 100;
            colVolCurve.FieldName = "VolCurve";
            colVolCurve.MaxWidth = 100;
            colVolCurve.MinWidth = 100;
            colVolCurve.Name = "colVolCurve";
            colVolCurve.Visible = true;
            colVolCurve.VisibleIndex = 11;
            colVolCurve.Width = 100;
            // 
            // HydroWaterboxListCtrl
            // 
@@ -475,11 +475,11 @@
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem8;
        private DevExpress.XtraGrid.Columns.GridColumn colCurve;
        private DevExpress.XtraGrid.Columns.GridColumn colSet;
        private DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit repositoryItemButtonEdit1;
        private GeneralSearchAndSetCtrl generalSearchAndSetCtrl1;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
        private DevExpress.XtraGrid.Columns.GridColumn colCalcuL;
        private DevExpress.XtraGrid.Columns.GridColumn colVolCurve;
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-visual/03-waterbox/HydroWaterboxListCtrl.cs
@@ -306,7 +306,7 @@
            this.colMaxLevel.Visible = false;
            this.colDN.Visible = false;
            this.colMinVol.Visible = false;
            this.colCurve.Visible = false;
            this.colVolCurve.Visible = false;
            this.colOverFlow.Visible = false;
            this.colHasDb.Visible = false;
            this.colFlags.Visible = true;
@@ -331,7 +331,7 @@
            this.colMaxLevel.Visible = true;
            this.colDN.Visible = true;
            this.colMinVol.Visible = true;
            this.colCurve.Visible = true;
            this.colVolCurve.Visible = true;
            this.colOverFlow.Visible = true;
            this.colHasDb.Visible = true;
            this.colFlags.Visible = true;
@@ -356,7 +356,7 @@
            this.colMaxLevel.Visible = true;
            this.colDN.Visible = true;
            this.colMinVol.Visible = true;
            this.colCurve.Visible = true;
            this.colVolCurve.Visible = true;
            this.colOverFlow.Visible = true;
            this.colHasDb.Visible = true;
            this.colFlags.Visible = true;
@@ -381,7 +381,7 @@
            this.colMaxLevel.Visible = true;
            this.colDN.Visible = true;
            this.colMinVol.Visible = true;
            this.colCurve.Visible = true;
            this.colVolCurve.Visible = true;
            this.colOverFlow.Visible = true;
            this.colHasDb.Visible = true;
            this.colFlags.Visible = true;
@@ -406,7 +406,7 @@
            this.colMaxLevel.Visible = true;
            this.colDN.Visible = true;
            this.colMinVol.Visible = true;
            this.colCurve.Visible = true;
            this.colVolCurve.Visible = true;
            this.colOverFlow.Visible = true;
            this.colHasDb.Visible = true;
            this.colFlags.Visible = true;
WinFrmUI/Yw.WinFrmUI.Hydro.Core/12-monitor/05-analy/HydroWorkingMonitorAnalyListCtrl.cs
@@ -61,13 +61,16 @@
                HydroCalcuResult calcuResult
            )
        {
            _hydroInfo = hydroInfo;
            _allMonitorList = allMonitorList;
            _calcuResult = calcuResult;
            InitialSingleColumns();
            InitialSingleDataTable();
            var overlay = this.ShowOverlay();
            this.bindingSource1.DataSource = _dt;
            this.bindingSource1.ResetBindings(false);
            this.gridView1.RefreshData();
            overlay.Close();
        }
        /// <summary>
@@ -80,13 +83,16 @@
                List<HydroWorkingVmo> allWorkingList
            )
        {
            _hydroInfo = hydroInfo;
            _allMonitorList = allMonitorList;
            _allWorkingList = allWorkingList;
            var overlay = this.ShowOverlay();
            InitialMultiColumns();
            InitialMultiDataTable();
            this.bindingSource1.DataSource = _dt;
            this.bindingSource1.ResetBindings(false);
            this.gridView1.RefreshData();
            overlay.Close();
        }
WinFrmUI/Yw.WinFrmUI.Hydro.Core/18-loss/01-curve/HydroSingleWorkingLossCurveCtrl.cs
@@ -10,7 +10,7 @@
    {
        public HydroSingleWorkingLossCurveCtrl()
        {
            InitializeComponent();
            InitializeComponent();
        }
        /// <summary>
@@ -219,18 +219,19 @@
            e.CrosshairLineElement.Color = Color.Green;
            e.CrosshairLineElement.LineStyle.DashStyle = DashStyle.DashDot;
            e.CrosshairLineElement.LineStyle.Thickness = 3;
            // Specify the back color for the crosshair argument axis label. 
            foreach (CrosshairAxisLabelElement axisLabelElement in e.CrosshairAxisLabelElements)
            {
                axisLabelElement.BackColor = Color.Blue;
                axisLabelElement.Text = $"{axisLabelElement.AxisValue:N2}";
                axisLabelElement.Text = $"{axisLabelElement.AxisValue:N2}";
            }
            foreach (CrosshairElementGroup group in e.CrosshairElementGroups)
            {
                CrosshairGroupHeaderElement groupHeaderElement = group.HeaderElement;
            {
                CrosshairGroupHeaderElement groupHeaderElement = group.HeaderElement;
                var pt = group.HeaderElement.SeriesPoints.FirstOrDefault();
                if (pt != null)
                {
@@ -239,12 +240,12 @@
                    {
                        groupHeaderElement.Text = model.Name;
                    }
                }
                }
                // Specify the text, text color and font for the crosshair group header element. 
                groupHeaderElement.TextColor = Color.Green;
                groupHeaderElement.DXFont = new DXFont("SegoeUI", 12, DXFontStyle.Bold);
                groupHeaderElement.Text = group.CrosshairElements[0].AxisLabelElement.Text;
                //groupHeaderElement.Text = group.CrosshairElements[0].AxisLabelElement.Text;
                foreach (var ele in group.CrosshairElements)
                {
@@ -252,7 +253,7 @@
                    ele.AxisLabelElement.DXFont = new DXFont(this.Font.Name, 6);
                    //ele.AxisLabelElement.Visible = false; 
                }
                //// Obtain the first series.
                //CrosshairElement element = group.CrosshairElements[0];
WinFrmUI/Yw.WinFrmUI.Hydro.Core/19-pump/00-core/HydroPumpCurveColorHelper.cs
@@ -8,7 +8,7 @@
        //缓存
        private static List<Color> _cache = new List<Color>()
        {
            Color.Red, Color.Blue, Color.Green,Color.Fuchsia,Color.Maroon,Color.Bisque,
            Color.Red, Color.Blue, Color.Green,Color.Fuchsia,Color.Maroon,
            Color.MidnightBlue,   Color.Aquamarine,Color.DodgerBlue, Color.BurlyWood
        };
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj
@@ -42,7 +42,7 @@
    <ItemGroup>
        <PackageReference Include="DevExpress.Win.Design" Version="23.2.4" />
        <PackageReference Include="Yw.BLL.Basic.Core" Version="3.3.0" />
        <PackageReference Include="Yw.BLL.Hydro.Core" Version="3.7.1" />
        <PackageReference Include="Yw.BLL.Hydro.Core" Version="3.7.2" />
        <PackageReference Include="Yw.Pump.Core" Version="3.1.7" />
    </ItemGroup>