Shuxia Ning
2024-10-14 c4408f6dbef369110f17808808ae45e48726f3f1
Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0
已修改5个文件
430 ■■■■ 文件已修改
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.Designer.cs 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/09-mark/SetHydroMarkCtrl.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/09-mark/SetHydroMarkDlg.Designer.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/09-mark/SetHydroMarkPureCtrl.cs 300 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.Designer.cs
@@ -53,6 +53,7 @@
            barBtnSetJunctionList = new DevExpress.XtraBars.BarButtonItem();
            barBtnFeatCurve = new DevExpress.XtraBars.BarButtonItem();
            barBtnSearch = new DevExpress.XtraBars.BarButtonItem();
            barBtnMark = new DevExpress.XtraBars.BarButtonItem();
            ribbonPage1 = new DevExpress.XtraBars.Ribbon.RibbonPage();
            pageGroupMatching = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
            pageGroupModel = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
@@ -62,23 +63,18 @@
            tabPane1 = new DevExpress.XtraBars.Navigation.TabPane();
            tabPageBimface = new DevExpress.XtraBars.Navigation.TabNavigationPage();
            pageQ3d = new DevExpress.XtraBars.Navigation.TabNavigationPage();
            xhsProjectSimulationQ3dCtrl1 = new XhsProjectSimulationQ3dCtrl();
            dockManager1 = new DevExpress.XtraBars.Docking.DockManager(components);
            docPnlProperty = new DevExpress.XtraBars.Docking.DockPanel();
            dockPanel1_Container = new DevExpress.XtraBars.Docking.ControlContainer();
            xhsProjectSimulationPropertyCtrl1 = new XhsProjectSimulationPropertyCtrl();
            docPnlBottom = new DevExpress.XtraBars.Docking.DockPanel();
            controlContainerBottom = new DevExpress.XtraBars.Docking.ControlContainer();
            svgImg32 = new DevExpress.Utils.SvgImageCollection(components);
            rmSet = new DevExpress.XtraBars.Ribbon.RadialMenu(components);
            barBtnMark = new DevExpress.XtraBars.BarButtonItem();
            ((ISupportInitialize)ribbonControl1).BeginInit();
            ((ISupportInitialize)tabPane1).BeginInit();
            tabPane1.SuspendLayout();
            pageQ3d.SuspendLayout();
            ((ISupportInitialize)dockManager1).BeginInit();
            docPnlProperty.SuspendLayout();
            dockPanel1_Container.SuspendLayout();
            docPnlBottom.SuspendLayout();
            ((ISupportInitialize)svgImg32).BeginInit();
            ((ISupportInitialize)rmSet).BeginInit();
@@ -252,6 +248,14 @@
            barBtnSearch.Name = "barBtnSearch";
            barBtnSearch.ItemClick += barBtnSearch_ItemClick;
            // 
            // barBtnMark
            //
            barBtnMark.Caption = "标注";
            barBtnMark.Id = 33;
            barBtnMark.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnMark.ImageOptions.SvgImage");
            barBtnMark.Name = "barBtnMark";
            barBtnMark.ItemClick += barBtnMark_ItemClick;
            //
            // ribbonPage1
            // 
            ribbonPage1.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] { pageGroupMatching, pageGroupModel, ribbonPageGroup2, ribbonPageGroup3 });
@@ -318,18 +322,8 @@
            // pageQ3d
            // 
            pageQ3d.Caption = "水力模型";
            pageQ3d.Controls.Add(xhsProjectSimulationQ3dCtrl1);
            pageQ3d.Name = "pageQ3d";
            pageQ3d.Size = new Size(692, 307);
            //
            // xhsProjectSimulationQ3dCtrl1
            //
            xhsProjectSimulationQ3dCtrl1.Dock = DockStyle.Fill;
            xhsProjectSimulationQ3dCtrl1.Location = new Point(0, 0);
            xhsProjectSimulationQ3dCtrl1.Name = "xhsProjectSimulationQ3dCtrl1";
            xhsProjectSimulationQ3dCtrl1.Size = new Size(692, 307);
            xhsProjectSimulationQ3dCtrl1.TabIndex = 0;
            xhsProjectSimulationQ3dCtrl1.ClickParterEvent += xhsProjectSimulationQ3dCtrl1_ClickParterEvent;
            // 
            // dockManager1
            // 
@@ -350,19 +344,10 @@
            // 
            // dockPanel1_Container
            // 
            dockPanel1_Container.Controls.Add(xhsProjectSimulationPropertyCtrl1);
            dockPanel1_Container.Location = new Point(4, 26);
            dockPanel1_Container.Name = "dockPanel1_Container";
            dockPanel1_Container.Size = new Size(268, 476);
            dockPanel1_Container.TabIndex = 0;
            //
            // xhsProjectSimulationPropertyCtrl1
            //
            xhsProjectSimulationPropertyCtrl1.Dock = DockStyle.Fill;
            xhsProjectSimulationPropertyCtrl1.Location = new Point(0, 0);
            xhsProjectSimulationPropertyCtrl1.Name = "xhsProjectSimulationPropertyCtrl1";
            xhsProjectSimulationPropertyCtrl1.Size = new Size(268, 476);
            xhsProjectSimulationPropertyCtrl1.TabIndex = 0;
            // 
            // docPnlBottom
            // 
@@ -403,13 +388,6 @@
            rmSet.Name = "rmSet";
            rmSet.Ribbon = ribbonControl1;
            // 
            // barBtnMark
            //
            barBtnMark.Caption = "标注";
            barBtnMark.Id = 33;
            barBtnMark.ImageOptions.SvgImage = (DevExpress.Utils.Svg.SvgImage)resources.GetObject("barBtnMark.ImageOptions.SvgImage");
            barBtnMark.Name = "barBtnMark";
            //
            // XhsProjectSimulationCorePage
            // 
            Appearance.BackColor = SystemColors.Control;
@@ -426,10 +404,8 @@
            ((ISupportInitialize)ribbonControl1).EndInit();
            ((ISupportInitialize)tabPane1).EndInit();
            tabPane1.ResumeLayout(false);
            pageQ3d.ResumeLayout(false);
            ((ISupportInitialize)dockManager1).EndInit();
            docPnlProperty.ResumeLayout(false);
            dockPanel1_Container.ResumeLayout(false);
            docPnlBottom.ResumeLayout(false);
            ((ISupportInitialize)svgImg32).EndInit();
            ((ISupportInitialize)rmSet).EndInit();
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs
@@ -1,4 +1,6 @@
global using Yw.EPAnet;
using Yw.WinFrmUI.Bimface;
using Yw.WinFrmUI.Hydro;
namespace HStation.WinFrmUI
{
@@ -599,7 +601,7 @@
                var qh_pt_list = qh.Select(x => new Yw.Geometry.Point2d(x.X, x.Y)).ToList();
                var qe_pt_list = qe?.Select(x => new Yw.Geometry.Point2d(x.X, x.Y)).ToList();
                var qp_pt_list = qp?.Select(x => new Yw.Geometry.Point2d(x.X, x.Y)).ToList();
                var vm = new Yw.WinFrmUI.Phart.PumpSerialParallelViewModel();
                vm.Id = x.Code;
                vm.Name = x.Code;
@@ -780,5 +782,76 @@
        #region 标注
        private List<HydroMarkSetViewModel> _allMarkList = null;
        //标注
        private void barBtnMark_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (_hydroInfo == null)
            {
                return;
            }
            if (_allMarkList == null)
            {
                _allMarkList = new List<HydroMarkSetViewModel>();
                if (_hydroInfo.Waterboxs != null && _hydroInfo.Waterboxs.Count > 0)
                {
                    _allMarkList.Add(new HydroMarkSetViewModel()
                    {
                        Code = Yw.Hydro.ParterCatalog.Waterbox,
                        Name = Yw.WinFrmUI.HydroParterCatalogHelper.GetCatalogName(Yw.Hydro.ParterCatalog.Waterbox),
                        MarkType = (int)eWaterboxMarkType.None
                    });
                }
                if (_hydroInfo.Pumps != null && _hydroInfo.Pumps.Count > 0)
                {
                    _allMarkList.Add(new HydroMarkSetViewModel()
                    {
                        Code = Yw.Hydro.ParterCatalog.Pump,
                        Name = Yw.WinFrmUI.HydroParterCatalogHelper.GetCatalogName(Yw.Hydro.ParterCatalog.Pump),
                        MarkType = (int)eWaterboxMarkType.None
                    });
                }
                if (_hydroInfo.Valves != null && _hydroInfo.Valves.Count > 0)
                {
                    _allMarkList.Add(new HydroMarkSetViewModel()
                    {
                        Code = Yw.Hydro.ParterCatalog.Valve,
                        Name = Yw.WinFrmUI.HydroParterCatalogHelper.GetCatalogName(Yw.Hydro.ParterCatalog.Valve),
                        MarkType = (int)eWaterboxMarkType.None
                    });
                }
                if (_hydroInfo.Pipes != null && _hydroInfo.Pipes.Count > 0)
                {
                    _allMarkList.Add(new HydroMarkSetViewModel()
                    {
                        Code = Yw.Hydro.ParterCatalog.Pipe,
                        Name = Yw.WinFrmUI.HydroParterCatalogHelper.GetCatalogName(Yw.Hydro.ParterCatalog.Pipe),
                        MarkType = (int)eWaterboxMarkType.None
                    });
                }
                if (_hydroInfo.Nozzles != null && _hydroInfo.Nozzles.Count > 0)
                {
                    _allMarkList.Add(new HydroMarkSetViewModel()
                    {
                        Code = Yw.Hydro.ParterCatalog.Nozzle,
                        Name = Yw.WinFrmUI.HydroParterCatalogHelper.GetCatalogName(Yw.Hydro.ParterCatalog.Nozzle),
                        MarkType = (int)eWaterboxMarkType.None
                    });
                }
            }
            var dlg = new SetHydroMarkDlg();
            dlg.SetBindingData(() => _hydroInfo, _allMarkList);
            dlg.ReloadDataEvent += async (obj) =>
            {
                var leadLabels = obj?.Select(x => new LeadLabel() { Id = x.Code, Text = x.Text }).ToList();
                await _bimfaceCtrl?.SetLeadLabels(leadLabels);
            };
            dlg.ShowDialog();
        }
        #endregion
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/09-mark/SetHydroMarkCtrl.cs
@@ -33,15 +33,14 @@
        private void btnCancel_Click(object sender, EventArgs e)
        {
            var list = this.setHydroMarkPureCtrl1.GetResultList();
            this.ReloadDataEvent?.Invoke(list);
            this.OkEvent?.Invoke();
            this.CancelEvent?.Invoke();
        }
        private void btnOk_Click(object sender, EventArgs e)
        {
            this.CancelEvent?.Invoke();
            var list = this.setHydroMarkPureCtrl1.GetResultList();
            this.ReloadDataEvent?.Invoke(list);
            this.OkEvent?.Invoke();
        }
WinFrmUI/Yw.WinFrmUI.Hydro.Core/09-mark/SetHydroMarkDlg.Designer.cs
@@ -36,14 +36,14 @@
            setHydroMarkCtrl1.Dock = DockStyle.Fill;
            setHydroMarkCtrl1.Location = new Point(10, 5);
            setHydroMarkCtrl1.Name = "setHydroMarkCtrl1";
            setHydroMarkCtrl1.Size = new Size(397, 510);
            setHydroMarkCtrl1.Size = new Size(342, 448);
            setHydroMarkCtrl1.TabIndex = 0;
            // 
            // SetHydroMarkDlg
            // 
            AutoScaleDimensions = new SizeF(7F, 14F);
            AutoScaleMode = AutoScaleMode.Font;
            ClientSize = new Size(417, 525);
            ClientSize = new Size(362, 463);
            Controls.Add(setHydroMarkCtrl1);
            Name = "SetHydroMarkDlg";
            Padding = new Padding(10, 5, 10, 10);
WinFrmUI/Yw.WinFrmUI.Hydro.Core/09-mark/SetHydroMarkPureCtrl.cs
@@ -1,5 +1,6 @@
using DevExpress.XtraEditors.Repository;
using DevExpress.XtraRichEdit.Design;
using DevExpress.XtraSpreadsheet;
using Yw.WinFrmUI.Hydro;
namespace Yw.WinFrmUI
@@ -43,12 +44,301 @@
            {
                return default;
            }
            if (_allBindingList == null || _allBindingList.Count < 1)
            {
                return default;
            }
            var resultList = new List<HydroMarkResultViewModel>();
            var resultList = new List<HydroMarkResultViewModel>();
            _allBindingList?.ToList().ForEach(x =>
            {
                switch (x.Code)
                {
                    case Yw.Hydro.ParterCatalog.Waterbox:
                        {
                            if (hydroInfo.Waterboxs != null && hydroInfo.Waterboxs.Count > 0)
                            {
                                switch ((eWaterboxMarkType)x.MarkType)
                                {
                                    case eWaterboxMarkType.None:
                                        {
                                        }
                                        break;
                                    case eWaterboxMarkType.PoolElev:
                                        {
                                            hydroInfo.Waterboxs.ForEach(t =>
                                            {
                                                resultList.Add(new HydroMarkResultViewModel()
                                                {
                                                    Code = t.Code,
                                                    Text = $"池底标高:{t.PoolElev}m"
                                                });
                                            });
                                        }
                                        break;
                                    case eWaterboxMarkType.InitLevel:
                                        {
                                            hydroInfo.Waterboxs.ForEach(t =>
                                            {
                                                resultList.Add(new HydroMarkResultViewModel()
                                                {
                                                    Code = t.Code,
                                                    Text = $"初始水位:{t.InitLevel}m"
                                                });
                                            });
                                        }
                                        break;
                                    case eWaterboxMarkType.MinLevel:
                                        {
                                            hydroInfo.Waterboxs.ForEach(t =>
                                            {
                                                resultList.Add(new HydroMarkResultViewModel()
                                                {
                                                    Code = t.Code,
                                                    Text = $"最小水位:{t.MinLevel}m"
                                                });
                                            });
                                        }
                                        break;
                                    case eWaterboxMarkType.MaxLevel:
                                        {
                                            hydroInfo.Waterboxs.ForEach(t =>
                                            {
                                                resultList.Add(new HydroMarkResultViewModel()
                                                {
                                                    Code = t.Code,
                                                    Text = $"最高水位:{t.MaxLevel}m"
                                                });
                                            });
                                        }
                                        break;
                                    case eWaterboxMarkType.Diameter:
                                        {
                                            hydroInfo.Waterboxs.ForEach(t =>
                                            {
                                                resultList.Add(new HydroMarkResultViewModel()
                                                {
                                                    Code = t.Code,
                                                    Text = $"直径:{t.MaxLevel}m"
                                                });
                                            });
                                        }
                                        break;
                                    case eWaterboxMarkType.MinVol:
                                        {
                                            hydroInfo.Waterboxs.ForEach(t =>
                                            {
                                                resultList.Add(new HydroMarkResultViewModel()
                                                {
                                                    Code = t.Code,
                                                    Text = $"最小容积:{t.MinVol}m"
                                                });
                                            });
                                        }
                                        break;
                                    default: break;
                                }
                            }
                        }
                        break;
                    case Yw.Hydro.ParterCatalog.Pump:
                        {
                            if (hydroInfo.Pumps != null && hydroInfo.Pumps.Count > 0)
                            {
                                switch ((ePumpMarkType)x.MarkType)
                                {
                                    case ePumpMarkType.None:
                                        {
                                        }
                                        break;
                                    case ePumpMarkType.PumpStatus:
                                        {
                                            hydroInfo.Pumps.ForEach(t =>
                                            {
                                                resultList.Add(new HydroMarkResultViewModel()
                                                {
                                                    Code = t.Code,
                                                    Text = $"开机状态:{Yw.WinFrmUI.HydroLinkStatusHelper.GetStatusName(t.LinkStatus)}"
                                                });
                                            });
                                        }
                                        break;
                                    case ePumpMarkType.RatedP:
                                        {
                                            hydroInfo.Pumps.ForEach(t =>
                                            {
                                                resultList.Add(new HydroMarkResultViewModel()
                                                {
                                                    Code = t.Code,
                                                    Text = $"额定功率:{t.RatedP}kW"
                                                });
                                            });
                                        }
                                        break;
                                    case ePumpMarkType.RatedQ:
                                        {
                                            hydroInfo.Pumps.ForEach(t =>
                                            {
                                                resultList.Add(new HydroMarkResultViewModel()
                                                {
                                                    Code = t.Code,
                                                    Text = $"额定流量:{t.RatedQ}m³/h"
                                                });
                                            });
                                        }
                                        break;
                                    case ePumpMarkType.RatedH:
                                        {
                                            hydroInfo.Pumps.ForEach(t =>
                                            {
                                                resultList.Add(new HydroMarkResultViewModel()
                                                {
                                                    Code = t.Code,
                                                    Text = $"额定扬程:{t.RatedH}m"
                                                });
                                            });
                                        }
                                        break;
                                    case ePumpMarkType.RatedN:
                                        {
                                            hydroInfo.Pumps.ForEach(t =>
                                            {
                                                resultList.Add(new HydroMarkResultViewModel()
                                                {
                                                    Code = t.Code,
                                                    Text = $"额定转速:{t.RatedN}r/min"
                                                });
                                            });
                                        }
                                        break;
                                    case ePumpMarkType.RatedHz:
                                        {
                                            hydroInfo.Pumps.ForEach(t =>
                                            {
                                                //resultList.Add(new HydroMarkResultViewModel()
                                                //{
                                                //    Code = t.Code,
                                                //    Text = $"额定频率:{t.RatedHz}"
                                                //});
                                            });
                                        }
                                        break;
                                    case ePumpMarkType.CurrentN:
                                        {
                                            hydroInfo.Pumps.ForEach(t =>
                                            {
                                                //resultList.Add(new HydroMarkResultViewModel()
                                                //{
                                                //    Code = t.Code,
                                                //    Text = $"额定频率:{t.RatedHz}"
                                                //});
                                            });
                                        }
                                        break;
                                    case ePumpMarkType.CurrentHz:
                                        {
                                            hydroInfo.Pumps.ForEach(t =>
                                            {
                                                //resultList.Add(new HydroMarkResultViewModel()
                                                //{
                                                //    Code = t.Code,
                                                //    Text = $"额定频率:{t.RatedHz}"
                                                //});
                                            });
                                        }
                                        break;
                                    default: break;
                                }
                            }
                        }
                        break;
                    case Yw.Hydro.ParterCatalog.Valve:
                        {
                        }
                        break;
                    case Yw.Hydro.ParterCatalog.Pipe:
                        {
                            if (hydroInfo.Pipes != null && hydroInfo.Pipes.Count > 0)
                            {
                                switch ((ePipeMarkType)x.MarkType)
                                {
                                    case ePipeMarkType.None:
                                        {
                                        }
                                        break;
                                    case ePipeMarkType.PipeStatus:
                                        {
                                            hydroInfo.Pipes.ForEach(t =>
                                            {
                                                resultList.Add(new HydroMarkResultViewModel()
                                                {
                                                    Code = t.Code,
                                                    Text = $"状态:{Yw.WinFrmUI.HydroLinkStatusHelper.GetStatusName(t.LinkStatus)}"
                                                });
                                            });
                                        }
                                        break;
                                    case ePipeMarkType.Diameter:
                                        {
                                            hydroInfo.Pipes.ForEach(t =>
                                            {
                                                resultList.Add(new HydroMarkResultViewModel()
                                                {
                                                    Code = t.Code,
                                                    Text = $"直径:{t.Diameter}mm"
                                                });
                                            });
                                        }
                                        break;
                                    case ePipeMarkType.Length:
                                        {
                                            hydroInfo.Pipes.ForEach(t =>
                                            {
                                                resultList.Add(new HydroMarkResultViewModel()
                                                {
                                                    Code = t.Code,
                                                    Text = $"长度:{t.Length}m"
                                                });
                                            });
                                        }
                                        break;
                                    case ePipeMarkType.Roughness:
                                        {
                                            hydroInfo.Pipes.ForEach(t =>
                                            {
                                                resultList.Add(new HydroMarkResultViewModel()
                                                {
                                                    Code = t.Code,
                                                    Text = $"粗糙系数:{t.Roughness}"
                                                });
                                            });
                                        }
                                        break;
                                    case ePipeMarkType.MinorLoss:
                                        {
                                            hydroInfo.Pipes.ForEach(t =>
                                            {
                                                resultList.Add(new HydroMarkResultViewModel()
                                                {
                                                    Code = t.Code,
                                                    Text = $"局阻系数:{t.MinorLoss}"
                                                });
                                            });
                                        }
                                        break;
                                    default: break;
                                }
                            }
                        }
                        break;
                    case Yw.Hydro.ParterCatalog.Nozzle:
                        {
                        }
                        break;
                    default: break;
                }
            });
            return resultList;
        }