lixiaojun
2024-10-10 6be03c3aa61e9b89d824374ca74a9676c07a4943
显示校验明细
已删除5个文件
已重命名11个文件
已修改9个文件
已添加15个文件
1444 ■■■■ 文件已修改
Hydro/Yw.Hydro.Core/Yw.Hydro.Core.csproj 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/02-check/XhsProjectSimulationHydroCheckFailedCtrl.Designer.cs 115 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/02-check/XhsProjectSimulationHydroCheckFailedCtrl.cs 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/02-check/XhsProjectSimulationHydroCheckFailedDlg.Designer.cs 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/02-check/XhsProjectSimulationHydroCheckFailedDlg.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/02-check/XhsProjectSimulationHydroCheckFailedViewModel.cs 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/02-check/XhsProjectSimulationHydroCheckResultCtrl.Designer.cs 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/02-check/XhsProjectSimulationHydroCheckResultCtrl.cs 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/02-check/XhsProjectSimulationHydroCheckResultCtrl.resx 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.Designer.cs 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj.user 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/05-check/00-core/HydroCheckItem.cs 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/05-check/00-core/HydroCheckMode.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/05-check/00-core/HydroCheckResult.cs 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/05-check/00-core/HydroCheckType.cs 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/05-check/00-core/HydroModelInfoCheckExtensions.cs 254 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/05-check/01-control/HydroCheckItemViewModel.cs 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/05-check/01-control/HydroCheckResultCtrl.Designer.cs 374 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/05-check/01-control/HydroCheckResultCtrl.cs 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/05-check/01-control/HydroCheckResultCtrl.resx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-q3d/HydroQ3dViewPage.Designer.cs 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-q3d/HydroQ3dViewPage.cs 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-q3d/HydroQ3dViewPage.resx 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/07-l2d/HydroL2dViewPage.Designer.cs 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/07-l2d/HydroL2dViewPage.cs 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/07-l2d/HydroL2dViewPage.resx 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/08-l3d/HydroL3dViewPage.Designer.cs 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/08-l3d/HydroL3dViewPage.cs 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/08-l3d/HydroL3dViewPage.resx 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Properties/DataSources/Yw.WinFrmUI.HydroCheckItemViewModel.datasource 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Properties/Resources.Designer.cs 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Properties/Resources.resx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Resources/failed_128.png 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Resources/failed_64.png 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Resources/succeed_128.png 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Resources/succeed_64.png 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj.user 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Hydro/Yw.Hydro.Core/Yw.Hydro.Core.csproj
@@ -7,7 +7,7 @@
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Yw.Service.Hydro.Core" Version="3.5.0" />
    <PackageReference Include="Yw.Service.Hydro.Core" Version="3.5.1" />
  </ItemGroup>
  <ItemGroup>
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/02-check/XhsProjectSimulationHydroCheckFailedCtrl.Designer.cs
ÎļþÒÑɾ³ý
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/02-check/XhsProjectSimulationHydroCheckFailedCtrl.cs
ÎļþÒÑɾ³ý
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/02-check/XhsProjectSimulationHydroCheckFailedDlg.Designer.cs
ÎļþÒÑɾ³ý
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/02-check/XhsProjectSimulationHydroCheckFailedDlg.cs
ÎļþÒÑɾ³ý
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/02-check/XhsProjectSimulationHydroCheckFailedViewModel.cs
ÎļþÒÑɾ³ý
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/02-check/XhsProjectSimulationHydroCheckResultCtrl.Designer.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,57 @@
namespace HStation.WinFrmUI
{
    partial class XhsProjectSimulationHydroCheckResultCtrl
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
        #region Component Designer generated code
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            hydroCheckResultCtrl1 = new HydroCheckResultCtrl();
            SuspendLayout();
            //
            // hydroCheckResultCtrl1
            //
            hydroCheckResultCtrl1.Dock = DockStyle.Fill;
            hydroCheckResultCtrl1.Location = new Point(0, 0);
            hydroCheckResultCtrl1.Name = "hydroCheckResultCtrl1";
            hydroCheckResultCtrl1.Size = new Size(822, 448);
            hydroCheckResultCtrl1.TabIndex = 0;
            hydroCheckResultCtrl1.HydroClickEvent += hydroCheckResultCtrl1_HydroClickEvent;
            //
            // XhsProjectSimulationHydroCheckResultCtrl
            //
            AutoScaleDimensions = new SizeF(7F, 14F);
            AutoScaleMode = AutoScaleMode.Font;
            Controls.Add(hydroCheckResultCtrl1);
            Name = "XhsProjectSimulationHydroCheckResultCtrl";
            Size = new Size(822, 448);
            ResumeLayout(false);
        }
        #endregion
        private HydroCheckResultCtrl hydroCheckResultCtrl1;
    }
}
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/02-check/XhsProjectSimulationHydroCheckResultCtrl.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,29 @@
namespace HStation.WinFrmUI
{
    public partial class XhsProjectSimulationHydroCheckResultCtrl : DevExpress.XtraEditors.XtraUserControl
    {
        public XhsProjectSimulationHydroCheckResultCtrl()
        {
            InitializeComponent();
        }
        /// <summary>
        /// ç‚¹å‡»æž„件事件
        /// </summary>
        public event Action<string> HydroClickEvent;
        /// <summary>
        /// ç»‘定数据
        /// </summary>
        public void SetBindingData(Yw.WinFrmUI.HydroCheckResult result)
        {
            this.hydroCheckResultCtrl1.SetBindingData(result);
        }
        //水力点击
        private void hydroCheckResultCtrl1_HydroClickEvent(string code)
        {
            this.HydroClickEvent?.Invoke(code);
        }
    }
}
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/02-check/XhsProjectSimulationHydroCheckResultCtrl.resx
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.Designer.cs
@@ -74,7 +74,7 @@
            xhsProjectSimulationHydroCalcuFailedCtrl1 = new XhsProjectSimulationHydroCalcuFailedCtrl();
            docPnlHydroCheck = new DevExpress.XtraBars.Docking.DockPanel();
            controlContainer1 = new DevExpress.XtraBars.Docking.ControlContainer();
            xhsProjectSimulationHydroCheckFailedCtrl1 = new XhsProjectSimulationHydroCheckFailedCtrl();
            xhsProjectSimulationHydroCheckResultCtrl1 = new XhsProjectSimulationHydroCheckResultCtrl();
            docPnlUnMatchingList = new DevExpress.XtraBars.Docking.DockPanel();
            controlContainer4 = new DevExpress.XtraBars.Docking.ControlContainer();
            xhsProjectSimulationUnMatchingListCtrl1 = new XhsProjectSimulationUnMatchingListCtrl();
@@ -472,20 +472,20 @@
            // 
            // controlContainer1
            // 
            controlContainer1.Controls.Add(xhsProjectSimulationHydroCheckFailedCtrl1);
            controlContainer1.Controls.Add(xhsProjectSimulationHydroCheckResultCtrl1);
            controlContainer1.Location = new Point(3, 27);
            controlContainer1.Name = "controlContainer1";
            controlContainer1.Size = new Size(880, 58);
            controlContainer1.TabIndex = 0;
            // 
            // xhsProjectSimulationHydroCheckFailedCtrl1
            // xhsProjectSimulationHydroCheckResultCtrl1
            // 
            xhsProjectSimulationHydroCheckFailedCtrl1.Dock = DockStyle.Fill;
            xhsProjectSimulationHydroCheckFailedCtrl1.Location = new Point(0, 0);
            xhsProjectSimulationHydroCheckFailedCtrl1.Name = "xhsProjectSimulationHydroCheckFailedCtrl1";
            xhsProjectSimulationHydroCheckFailedCtrl1.Size = new Size(880, 58);
            xhsProjectSimulationHydroCheckFailedCtrl1.TabIndex = 0;
            xhsProjectSimulationHydroCheckFailedCtrl1.HydroClickEvent += xhsProjectSimulationHydroCheckFailedCtrl1_HydroClickEvent;
            xhsProjectSimulationHydroCheckResultCtrl1.Dock = DockStyle.Fill;
            xhsProjectSimulationHydroCheckResultCtrl1.Location = new Point(0, 0);
            xhsProjectSimulationHydroCheckResultCtrl1.Name = "xhsProjectSimulationHydroCheckResultCtrl1";
            xhsProjectSimulationHydroCheckResultCtrl1.Size = new Size(880, 58);
            xhsProjectSimulationHydroCheckResultCtrl1.TabIndex = 0;
            xhsProjectSimulationHydroCheckResultCtrl1.HydroClickEvent += xhsProjectSimulationHydroCheckResultCtrl1_HydroClickEvent;
            // 
            // docPnlUnMatchingList
            // 
@@ -638,7 +638,6 @@
        private DevExpress.Utils.SvgImageCollection svgImg32;
        private DevExpress.XtraBars.Docking.DockPanel docPnlHydroCheck;
        private DevExpress.XtraBars.Docking.ControlContainer controlContainer1;
        private XhsProjectSimulationHydroCheckFailedCtrl xhsProjectSimulationHydroCheckFailedCtrl1;
        private DevExpress.XtraBars.Docking.DockPanel docPnlHydroCalcu;
        private DevExpress.XtraBars.Docking.ControlContainer controlContainer2;
        private XhsProjectSimulationHydroCalcuFailedCtrl xhsProjectSimulationHydroCalcuFailedCtrl1;
@@ -666,5 +665,6 @@
        private DevExpress.XtraBars.BarButtonItem barBtnSetExchangerList;
        private DevExpress.XtraBars.BarButtonItem barBtnSetJunctionList;
        private DevExpress.XtraBars.BarButtonItem barBtnFeatCurve;
        private XhsProjectSimulationHydroCheckResultCtrl xhsProjectSimulationHydroCheckResultCtrl1;
    }
}
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs
@@ -27,7 +27,7 @@
        private Yw.Model.HydroModelInfo _hydroInfo = null;//水力信息
        private Yw.Model.HydroParterInfo _parter = null;
        private Yw.EPAnet.CheckResult _checkResult = null;
        private Yw.WinFrmUI.HydroCheckResult _checkResult = null;
        private Yw.EPAnet.CalcuResult _calcuResult = null;
        /// <summary>
@@ -317,28 +317,33 @@
            this.docPnlUnMatchingList.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden;
            this.docPnlMatchingList.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden;
            var netWork = Yw.Hydro.ParseHelper.ToNetwork(_hydroInfo);
            _checkResult = netWork.Check();
            if (_checkResult.Succeed)
            {
                TipFormHelper.ShowSucceed("校验通过!");
                return;
            }
            this.xhsProjectSimulationHydroCheckFailedCtrl1.SetBindingData(_checkResult.FailedList);
            _checkResult = _hydroInfo.Check();
            this.xhsProjectSimulationHydroCheckResultCtrl1.SetBindingData(_checkResult);
            this.docPnlHydroCheck.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Visible;
            this.docPnlHydroCheck.Height = 350;
        }
        //水力校验点击
        private async void xhsProjectSimulationHydroCheckFailedCtrl1_HydroClickEvent(string code)
        private async void xhsProjectSimulationHydroCheckResultCtrl1_HydroClickEvent(string code)
        {
            if (_hydroInfo == null)
            {
                return;
            }
            var allParterList = _hydroInfo.GetAllParters();
            _parter = allParterList.Find(x => x.Code == code);
            var elementIds = new List<string>() { _parter.Code };
            var elementIds = new List<string>();
            if (string.IsNullOrEmpty(code))
            {
                _parter = null;
            }
            else
            {
                var allParterList = _hydroInfo.GetAllParters();
                _parter = allParterList.Find(x => x.Code == code);
                if (_parter != null)
                {
                    elementIds.Add(_parter.Code);
                }
            }
            await this.xhsProjectSimulationBimfaceCtrl1.ZoomAndSelectComponents(elementIds);
            ShowProperty();
            SetBimfaceLinkColor();
WinFrmUI/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj
@@ -153,6 +153,9 @@
    <Compile Update="03-simulation\06-simulation\01-matching\07-fourlink\XhsProjectSimulationFourlinkMatchingListCtrl.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="03-simulation\06-simulation\02-check\XhsProjectSimulationHydroCheckResultCtrl.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="03-simulation\06-simulation\04-unmatching\00-core\XhsProjectSimulationUnMatchingListCtrl.cs">
      <SubType>UserControl</SubType>
    </Compile>
WinFrmUI/HStation.WinFrmUI.Xhs.Core/HStation.WinFrmUI.Xhs.Core.csproj.user
@@ -64,17 +64,11 @@
    <Compile Update="03-simulation\05-function\XhsProjectSimulationFunctionMgrCtrl.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="03-simulation\06-simulation\02-check\XhsProjectSimulationHydroCheckFailedCtrl.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="03-simulation\06-simulation\03-calcu\XhsProjectSimulationHydroCalcuFailedCtrl.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="03-simulation\06-simulation\04-unmatching\01-pump\XhsProjectSimulationPumpUnMatchingListCtrl.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="03-simulation\06-simulation\02-check\XhsProjectSimulationHydroCheckFailedDlg.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Update="03-simulation\06-simulation\05-search\XhsProjectSimulationSearchCtrl.cs">
      <SubType>UserControl</SubType>
WinFrmUI/Yw.WinFrmUI.Hydro.Core/05-check/00-core/HydroCheckItem.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,34 @@
namespace Yw.WinFrmUI
{
    /// <summary>
    /// æ°´ç®±æ£€æŸ¥é¡¹
    /// </summary>
    public class HydroCheckItem
    {
        /// <summary>
        /// æ£€æŸ¥æ¨¡å¼
        /// </summary>
        public int Mode { get; set; }
        /// <summary>
        /// æ£€æŸ¥ç±»åž‹
        /// </summary>
        public int Type { get; set; }
        /// <summary>
        /// æ£€æŸ¥ç¼–码
        /// </summary>
        public string Code { get; set; }
        /// <summary>
        /// å¤±è´¥
        /// </summary>
        public bool Failed { get; set; }
        /// <summary>
        /// å¤±è´¥åŽŸå› 
        /// </summary>
        public string Reason { get; set; }
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/05-check/00-core/HydroCheckMode.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,27 @@
namespace Yw.WinFrmUI
{
    /// <summary>
    /// æ°´åŠ›æ£€æŸ¥æ¨¡å¼
    /// </summary>
    public class HydroCheckMode
    {
        /// <summary>
        /// æ•´ä½“
        /// </summary>
        public const int Global = 1;
        /// <summary>
        /// æž„ä»¶
        /// </summary>
        public const int Item = 2;
        /// <summary>
        ///
        /// </summary>
        public static int Count()
        {
            return 2;
        }
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/05-check/00-core/HydroCheckResult.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,29 @@
namespace Yw.WinFrmUI
{
    /// <summary>
    /// æ£€æŸ¥ç»“æžœ
    /// </summary>
    public class HydroCheckResult
    {
        /// <summary>
        ///
        /// </summary>
        public HydroCheckResult()
        {
            this.Succeed = true;
            this.Items = new List<HydroCheckItem>();
        }
        /// <summary>
        /// æ˜¯å¦æˆåŠŸ
        /// </summary>
        public bool Succeed { get; set; }
        /// <summary>
        /// æ£€æŸ¥é¡¹åˆ—表
        /// </summary>
        public List<HydroCheckItem> Items { get; set; }
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/05-check/00-core/HydroCheckType.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,53 @@
namespace Yw.WinFrmUI
{
    /// <summary>
    /// æ°´åŠ›æ£€æŸ¥ç±»åž‹
    /// </summary>
    public class HydroCheckType
    {
        /// <summary>
        /// ç¼ºå°‘水源
        /// è‡³å°‘包含一座水库或水池(水箱)
        /// </summary>
        public const int LackSource = 1;
        /// <summary>
        /// ç¼ºå°‘连接节点
        ///  è‡³å°‘包含一个连接节点
        /// </summary>
        public const int LackJunction = 2;
        /// <summary>
        /// ç¼ºå°‘æ°´æ³µ
        /// è‡³å°‘包含一台水泵
        /// </summary>
        public const int LackPump = 3;
        /// <summary>
        /// å­¤ç«‹èŠ‚ç‚¹
        /// åˆ¤æ–­æ˜¯å¦æœ‰ç®¡æ®µè¿žæŽ¥
        /// </summary>
        public const int AloneNode = 4;
        /// <summary>
        /// ç®¡æ®µå¼‚常连接
        /// ç®¡æ®µå¼‚常连接
        /// </summary>
        public const int AbnormalLink = 5;
        /// <summary>
        /// å±žæ€§å¼‚常
        /// </summary>
        public const int AbnormalProp = 6;
        /// <summary>
        ///
        /// </summary>
        public static int Count()
        {
            return 6;
        }
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/05-check/00-core/HydroModelInfoCheckExtensions.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,254 @@
namespace Yw.WinFrmUI
{
    /// <summary>
    ///
    /// </summary>
    public static class HydroModelInfoCheckExtensions
    {
        /// <summary>
        /// æ ¡éªŒ
        /// </summary>
        public static HydroCheckResult Check(this Yw.Model.HydroModelInfo hydroInfo)
        {
            var result = new HydroCheckResult();
            if (hydroInfo == null)
            {
                result.Succeed = false;
                return result;
            }
            //验证水源
            var checkItemLackSource = new HydroCheckItem()
            {
                Mode = HydroCheckMode.Global,
                Type = HydroCheckType.LackSource,
                Code = string.Empty,
                Failed = false,
                Reason = "至少包含一座水库或水池(水箱)"
            };
            var allSourceList = hydroInfo.GetAllSources();
            result.Items.Add(checkItemLackSource);
            if (allSourceList == null || allSourceList.Count < 1)
            {
                checkItemLackSource.Failed = true;
            }
            //验证连接节点
            var checkItemLackJunction = new HydroCheckItem()
            {
                Mode = HydroCheckMode.Global,
                Type = HydroCheckType.LackJunction,
                Code = string.Empty,
                Failed = false,
                Reason = "至少包含一个连接节点"
            };
            result.Items.Add(checkItemLackJunction);
            var allJunctionList = hydroInfo.GetAllJunctions();
            if (allJunctionList == null || allJunctionList.Count < 1)
            {
                checkItemLackJunction.Failed = true;
            }
            //验证水泵
            var allPumpList = hydroInfo.Pumps;
            if (allPumpList == null)
            {
                allPumpList = new List<Model.HydroPumpInfo>();
            }
            var checkItemLackPump = new HydroCheckItem()
            {
                Mode = HydroCheckMode.Global,
                Type = HydroCheckType.LackPump,
                Code = string.Empty,
                Failed = false,
                Reason = "至少包含一台水泵"
            };
            result.Items.Add(checkItemLackPump);
            if (allPumpList.Count < 1)
            {
                checkItemLackPump.Failed = true;
            }
            //验证孤立节点
            var allNodeList = hydroInfo.GetAllNodes();
            var allLinkList = hydroInfo.GetAllLinks();
            foreach (var node in allNodeList)
            {
                var checkItemAloneNode = new HydroCheckItem()
                {
                    Mode = HydroCheckMode.Item,
                    Type = HydroCheckType.AloneNode,
                    Code = node.Code,
                    Failed = false,
                    Reason = "判断是否有管段连接"
                };
                result.Items.Add(checkItemAloneNode);
                if (!allLinkList.Exists(x => x.StartCode == node.Code || x.EndCode == node.Code))
                {
                    checkItemAloneNode.Failed = true;
                }
            }
            //验证管段异常连接
            foreach (var link in allLinkList)
            {
                var checkItemAbnormalLink = new HydroCheckItem()
                {
                    Mode = HydroCheckMode.Item,
                    Type = HydroCheckType.AbnormalLink,
                    Code = link.Code,
                    Failed = false,
                    Reason = "管段异常连接"
                };
                result.Items.Add(checkItemAbnormalLink);
                var startNode = allNodeList.Find(x => x.Code == link.StartCode);
                var endNode = allNodeList.Find(x => x.Code == link.EndCode);
                //孤立管段
                if (startNode == null && startNode == null)
                {
                    checkItemAbnormalLink.Failed = true;
                    checkItemAbnormalLink.Reason = "孤立管段";
                }
                else
                {
                    if (startNode == null)
                    {
                        checkItemAbnormalLink.Failed = true;
                        checkItemAbnormalLink.Reason = "缺少上游节点";
                    }
                    else if (endNode == null)
                    {
                        checkItemAbnormalLink.Failed = true;
                        checkItemAbnormalLink.Reason = "缺少下游节点";
                    }
                    else
                    {
                        if (startNode == endNode)
                        {
                            checkItemAbnormalLink.Failed = true;
                            checkItemAbnormalLink.Reason = "上下游节点相同";
                        }
                    }
                }
            }
            //验证水库
            //验证水池
            //验证水箱
            //验证水泵
            foreach (var pump in allPumpList)
            {
                //额定功率
                var checkItemRatedP = new HydroCheckItem()
                {
                    Mode = HydroCheckMode.Item,
                    Type = HydroCheckType.AbnormalProp,
                    Code = pump.Code,
                    Failed = false,
                    Reason = "判断水泵额定功率"
                };
                result.Items.Add(checkItemRatedP);
                if (pump.RatedP < 10)
                {
                    checkItemRatedP.Failed = true;
                    checkItemRatedP.Reason = "水泵额定功率设定错误";
                }
                //流量扬程曲线
                var checkItemCurveQH = new HydroCheckItem()
                {
                    Mode = HydroCheckMode.Item,
                    Type = HydroCheckType.AbnormalProp,
                    Code = pump.Code,
                    Failed = false,
                    Reason = "判断是否设置流量扬程曲线"
                };
                result.Items.Add(checkItemCurveQH);
                if (string.IsNullOrEmpty(pump.CurveQH))
                {
                    checkItemCurveQH.Failed = true;
                    checkItemCurveQH.Reason = "未设置流量扬程曲线";
                }
                else
                {
                    var curve = hydroInfo.Curves?.Find(x => x.Code == pump.CurveQH);
                    if (curve == null)
                    {
                        checkItemCurveQH.Failed = true;
                        checkItemCurveQH.Reason = "流量扬程曲线设置错误";
                    }
                }
            }
            //验证管道
            var allPipeList = hydroInfo.Pipes;
            if (allPipeList == null)
            {
                allPipeList = new List<Model.HydroPipeInfo>();
            }
            foreach (var pipe in allPipeList)
            {
                //长度
                var checkItemLength = new HydroCheckItem()
                {
                    Mode = HydroCheckMode.Item,
                    Type = HydroCheckType.AbnormalProp,
                    Code = pipe.Code,
                    Failed = false,
                    Reason = "判断管道长度"
                };
                result.Items.Add(checkItemLength);
                if (pipe.Length <= 0)
                {
                    checkItemLength.Failed = true;
                    checkItemLength.Reason = "管道长度属性设置错误";
                }
                //直径
                var checkItemDiameter = new HydroCheckItem()
                {
                    Mode = HydroCheckMode.Item,
                    Type = HydroCheckType.AbnormalProp,
                    Code = pipe.Code,
                    Failed = false,
                    Reason = "判断管道直径"
                };
                result.Items.Add(checkItemDiameter);
                if (pipe.Diameter <= 10 || pipe.Diameter > 10000)
                {
                    checkItemDiameter.Failed = true;
                    checkItemDiameter.Reason = "管道直径区间(10,10000]";
                }
                //粗糙系数
                var checkItemRoughness = new HydroCheckItem()
                {
                    Mode = HydroCheckMode.Item,
                    Type = HydroCheckType.AbnormalProp,
                    Code = pipe.Code,
                    Failed = false,
                    Reason = "判断管道粗糙系数"
                };
                result.Items.Add(checkItemRoughness);
                if (pipe.Roughness <= 5 || pipe.Roughness > 10000)
                {
                    checkItemRoughness.Failed = true;
                    checkItemRoughness.Reason = "管道粗糙系数(5,10000]";
                }
            }
            if (result.Items.Exists(x => x.Failed))
            {
                result.Succeed = false;
            }
            return result;
        }
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/05-check/01-control/HydroCheckItemViewModel.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,71 @@
namespace Yw.WinFrmUI
{
    /// <summary>
    ///
    /// </summary>
    public class HydroCheckItemViewModel
    {
        /// <summary>
        ///
        /// </summary>
        public HydroCheckItemViewModel() { }
        /// <summary>
        ///
        /// </summary>
        public HydroCheckItemViewModel(HydroCheckItem rhs)
        {
            switch (rhs.Mode)
            {
                case HydroCheckMode.Global: this.Mode = "整体"; break;
                case HydroCheckMode.Item: this.Mode = "构件"; break;
                default: break;
            }
            switch (rhs.Type)
            {
                case HydroCheckType.LackSource: this.Type = "缺少水源"; break;
                case HydroCheckType.LackJunction: this.Type = "缺少连接节点"; break;
                case HydroCheckType.LackPump: this.Type = "缺少水泵"; break;
                case HydroCheckType.AloneNode: this.Type = "孤立节点"; break;
                case HydroCheckType.AbnormalLink: this.Type = "管段异常连接"; break;
                case HydroCheckType.AbnormalProp: this.Type = "属性异常"; break;
                default: break;
            }
            this.Code = rhs.Code;
            this.Failed = rhs.Failed;
            this.Reason = rhs.Reason;
        }
        /// <summary>
        /// æ£€æŸ¥æ¨¡å¼
        /// </summary>
        [DisplayName("检查模式")]
        public string Mode { get; set; }
        /// <summary>
        /// æ£€æŸ¥ç±»åž‹
        /// </summary>
        [DisplayName("检查类型")]
        public string Type { get; set; }
        /// <summary>
        /// æ£€æŸ¥ç¼–码
        /// </summary>
        [DisplayName("检查编码")]
        public string Code { get; set; }
        /// <summary>
        /// æ˜¯å¦å¤±è´¥
        /// </summary>
        [DisplayName("是否失败")]
        public bool Failed { get; set; }
        /// <summary>
        /// æ£€æŸ¥åŽŸå› 
        /// </summary>
        [DisplayName("检查原因")]
        public string Reason { get; set; }
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/05-check/01-control/HydroCheckResultCtrl.Designer.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,374 @@
namespace Yw.WinFrmUI
{
    partial class HydroCheckResultCtrl
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
        #region Component Designer generated code
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            components = new Container();
            layoutControl1 = new DevExpress.XtraLayout.LayoutControl();
            txtFailedItems = new DevExpress.XtraEditors.TextEdit();
            txtSucceedItems = new DevExpress.XtraEditors.TextEdit();
            txtItems = new DevExpress.XtraEditors.TextEdit();
            txtType = new DevExpress.XtraEditors.TextEdit();
            txtMode = new DevExpress.XtraEditors.TextEdit();
            peSucceed = new DevExpress.XtraEditors.PictureEdit();
            gridControl1 = new DevExpress.XtraGrid.GridControl();
            hydroCheckItemViewModelBindingSource = new BindingSource(components);
            gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView();
            colMode = new DevExpress.XtraGrid.Columns.GridColumn();
            colType = new DevExpress.XtraGrid.Columns.GridColumn();
            colCode = new DevExpress.XtraGrid.Columns.GridColumn();
            colFailed = new DevExpress.XtraGrid.Columns.GridColumn();
            colReason = new DevExpress.XtraGrid.Columns.GridColumn();
            Root = new DevExpress.XtraLayout.LayoutControlGroup();
            layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
            emptySpaceItem1 = new DevExpress.XtraLayout.EmptySpaceItem();
            layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
            layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
            ((ISupportInitialize)layoutControl1).BeginInit();
            layoutControl1.SuspendLayout();
            ((ISupportInitialize)txtFailedItems.Properties).BeginInit();
            ((ISupportInitialize)txtSucceedItems.Properties).BeginInit();
            ((ISupportInitialize)txtItems.Properties).BeginInit();
            ((ISupportInitialize)txtType.Properties).BeginInit();
            ((ISupportInitialize)txtMode.Properties).BeginInit();
            ((ISupportInitialize)peSucceed.Properties).BeginInit();
            ((ISupportInitialize)gridControl1).BeginInit();
            ((ISupportInitialize)hydroCheckItemViewModelBindingSource).BeginInit();
            ((ISupportInitialize)gridView1).BeginInit();
            ((ISupportInitialize)Root).BeginInit();
            ((ISupportInitialize)layoutControlItem1).BeginInit();
            ((ISupportInitialize)layoutControlItem2).BeginInit();
            ((ISupportInitialize)layoutControlItem3).BeginInit();
            ((ISupportInitialize)layoutControlItem4).BeginInit();
            ((ISupportInitialize)emptySpaceItem1).BeginInit();
            ((ISupportInitialize)layoutControlItem5).BeginInit();
            ((ISupportInitialize)layoutControlItem6).BeginInit();
            ((ISupportInitialize)layoutControlItem7).BeginInit();
            SuspendLayout();
            //
            // layoutControl1
            //
            layoutControl1.Controls.Add(txtFailedItems);
            layoutControl1.Controls.Add(txtSucceedItems);
            layoutControl1.Controls.Add(txtItems);
            layoutControl1.Controls.Add(txtType);
            layoutControl1.Controls.Add(txtMode);
            layoutControl1.Controls.Add(peSucceed);
            layoutControl1.Controls.Add(gridControl1);
            layoutControl1.Dock = DockStyle.Fill;
            layoutControl1.Location = new Point(0, 0);
            layoutControl1.Name = "layoutControl1";
            layoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new Rectangle(1055, 207, 650, 400);
            layoutControl1.Root = Root;
            layoutControl1.Size = new Size(1094, 478);
            layoutControl1.TabIndex = 0;
            layoutControl1.Text = "layoutControl1";
            //
            // txtFailedItems
            //
            txtFailedItems.Location = new Point(78, 198);
            txtFailedItems.Name = "txtFailedItems";
            txtFailedItems.Properties.ReadOnly = true;
            txtFailedItems.Properties.UseReadOnlyAppearance = false;
            txtFailedItems.Size = new Size(70, 20);
            txtFailedItems.StyleController = layoutControl1;
            txtFailedItems.TabIndex = 10;
            //
            // txtSucceedItems
            //
            txtSucceedItems.Location = new Point(78, 174);
            txtSucceedItems.Name = "txtSucceedItems";
            txtSucceedItems.Properties.ReadOnly = true;
            txtSucceedItems.Properties.UseReadOnlyAppearance = false;
            txtSucceedItems.Size = new Size(70, 20);
            txtSucceedItems.StyleController = layoutControl1;
            txtSucceedItems.TabIndex = 9;
            //
            // txtItems
            //
            txtItems.Location = new Point(78, 150);
            txtItems.Name = "txtItems";
            txtItems.Properties.ReadOnly = true;
            txtItems.Properties.UseReadOnlyAppearance = false;
            txtItems.Size = new Size(70, 20);
            txtItems.StyleController = layoutControl1;
            txtItems.TabIndex = 8;
            //
            // txtType
            //
            txtType.Location = new Point(78, 126);
            txtType.Name = "txtType";
            txtType.Properties.ReadOnly = true;
            txtType.Properties.UseReadOnlyAppearance = false;
            txtType.Size = new Size(70, 20);
            txtType.StyleController = layoutControl1;
            txtType.TabIndex = 7;
            //
            // txtMode
            //
            txtMode.Location = new Point(78, 102);
            txtMode.Name = "txtMode";
            txtMode.Properties.ReadOnly = true;
            txtMode.Properties.UseReadOnlyAppearance = false;
            txtMode.Size = new Size(70, 20);
            txtMode.StyleController = layoutControl1;
            txtMode.TabIndex = 6;
            //
            // peSucceed
            //
            peSucceed.EditValue = Hydro.Core.Properties.Resources.succeed_64;
            peSucceed.Location = new Point(2, 2);
            peSucceed.Name = "peSucceed";
            peSucceed.Properties.AllowFocused = false;
            peSucceed.Properties.ShowMenu = false;
            peSucceed.Properties.SizeMode = DevExpress.XtraEditors.Controls.PictureSizeMode.Squeeze;
            peSucceed.Size = new Size(146, 96);
            peSucceed.StyleController = layoutControl1;
            peSucceed.TabIndex = 5;
            //
            // gridControl1
            //
            gridControl1.DataSource = hydroCheckItemViewModelBindingSource;
            gridControl1.Location = new Point(152, 2);
            gridControl1.MainView = gridView1;
            gridControl1.Name = "gridControl1";
            gridControl1.Size = new Size(940, 474);
            gridControl1.TabIndex = 4;
            gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { gridView1 });
            //
            // hydroCheckItemViewModelBindingSource
            //
            hydroCheckItemViewModelBindingSource.DataSource = typeof(HydroCheckItemViewModel);
            //
            // gridView1
            //
            gridView1.Appearance.ViewCaption.Options.UseTextOptions = true;
            gridView1.Appearance.ViewCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Near;
            gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { colMode, colType, colCode, colFailed, colReason });
            gridView1.GridControl = gridControl1;
            gridView1.Name = "gridView1";
            gridView1.ViewCaption = "校验明细";
            gridView1.RowClick += gridView1_RowClick;
            //
            // colMode
            //
            colMode.FieldName = "Mode";
            colMode.MaxWidth = 150;
            colMode.MinWidth = 100;
            colMode.Name = "colMode";
            colMode.Visible = true;
            colMode.VisibleIndex = 0;
            colMode.Width = 100;
            //
            // colType
            //
            colType.FieldName = "Type";
            colType.MaxWidth = 150;
            colType.MinWidth = 100;
            colType.Name = "colType";
            colType.Visible = true;
            colType.VisibleIndex = 1;
            colType.Width = 100;
            //
            // colCode
            //
            colCode.FieldName = "Code";
            colCode.MaxWidth = 150;
            colCode.MinWidth = 100;
            colCode.Name = "colCode";
            colCode.Visible = true;
            colCode.VisibleIndex = 2;
            colCode.Width = 100;
            //
            // colFailed
            //
            colFailed.FieldName = "Failed";
            colFailed.MaxWidth = 60;
            colFailed.MinWidth = 60;
            colFailed.Name = "colFailed";
            colFailed.Visible = true;
            colFailed.VisibleIndex = 3;
            colFailed.Width = 60;
            //
            // colReason
            //
            colReason.FieldName = "Reason";
            colReason.MinWidth = 100;
            colReason.Name = "colReason";
            colReason.Visible = true;
            colReason.VisibleIndex = 4;
            colReason.Width = 100;
            //
            // Root
            //
            Root.AppearanceItemCaption.Options.UseTextOptions = true;
            Root.AppearanceItemCaption.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
            Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
            Root.GroupBordersVisible = false;
            Root.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { layoutControlItem1, layoutControlItem2, layoutControlItem3, layoutControlItem4, emptySpaceItem1, layoutControlItem5, layoutControlItem6, layoutControlItem7 });
            Root.Name = "Root";
            Root.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0);
            Root.Size = new Size(1094, 478);
            Root.TextVisible = false;
            //
            // layoutControlItem1
            //
            layoutControlItem1.Control = gridControl1;
            layoutControlItem1.Location = new Point(150, 0);
            layoutControlItem1.Name = "layoutControlItem1";
            layoutControlItem1.Size = new Size(944, 478);
            layoutControlItem1.TextSize = new Size(0, 0);
            layoutControlItem1.TextVisible = false;
            //
            // layoutControlItem2
            //
            layoutControlItem2.Control = peSucceed;
            layoutControlItem2.Location = new Point(0, 0);
            layoutControlItem2.MaxSize = new Size(150, 100);
            layoutControlItem2.MinSize = new Size(150, 100);
            layoutControlItem2.Name = "layoutControlItem2";
            layoutControlItem2.Size = new Size(150, 100);
            layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
            layoutControlItem2.TextSize = new Size(0, 0);
            layoutControlItem2.TextVisible = false;
            //
            // layoutControlItem3
            //
            layoutControlItem3.Control = txtMode;
            layoutControlItem3.Location = new Point(0, 100);
            layoutControlItem3.Name = "layoutControlItem3";
            layoutControlItem3.Size = new Size(150, 24);
            layoutControlItem3.Text = "检查模式:";
            layoutControlItem3.TextSize = new Size(64, 14);
            //
            // layoutControlItem4
            //
            layoutControlItem4.Control = txtType;
            layoutControlItem4.Location = new Point(0, 124);
            layoutControlItem4.Name = "layoutControlItem4";
            layoutControlItem4.Size = new Size(150, 24);
            layoutControlItem4.Text = "检查类型:";
            layoutControlItem4.TextSize = new Size(64, 14);
            //
            // emptySpaceItem1
            //
            emptySpaceItem1.AllowHotTrack = false;
            emptySpaceItem1.Location = new Point(0, 220);
            emptySpaceItem1.Name = "emptySpaceItem1";
            emptySpaceItem1.Size = new Size(150, 258);
            emptySpaceItem1.TextSize = new Size(0, 0);
            //
            // layoutControlItem5
            //
            layoutControlItem5.Control = txtItems;
            layoutControlItem5.Location = new Point(0, 148);
            layoutControlItem5.Name = "layoutControlItem5";
            layoutControlItem5.Size = new Size(150, 24);
            layoutControlItem5.Text = "检查项:";
            layoutControlItem5.TextSize = new Size(64, 14);
            //
            // layoutControlItem6
            //
            layoutControlItem6.Control = txtSucceedItems;
            layoutControlItem6.Location = new Point(0, 172);
            layoutControlItem6.Name = "layoutControlItem6";
            layoutControlItem6.Size = new Size(150, 24);
            layoutControlItem6.Text = "检查成功项:";
            layoutControlItem6.TextSize = new Size(64, 14);
            //
            // layoutControlItem7
            //
            layoutControlItem7.Control = txtFailedItems;
            layoutControlItem7.Location = new Point(0, 196);
            layoutControlItem7.Name = "layoutControlItem7";
            layoutControlItem7.Size = new Size(150, 24);
            layoutControlItem7.Text = "检查失败项:";
            layoutControlItem7.TextSize = new Size(64, 14);
            //
            // HydroCheckResultCtrl
            //
            AutoScaleDimensions = new SizeF(7F, 14F);
            AutoScaleMode = AutoScaleMode.Font;
            Controls.Add(layoutControl1);
            Name = "HydroCheckResultCtrl";
            Size = new Size(1094, 478);
            ((ISupportInitialize)layoutControl1).EndInit();
            layoutControl1.ResumeLayout(false);
            ((ISupportInitialize)txtFailedItems.Properties).EndInit();
            ((ISupportInitialize)txtSucceedItems.Properties).EndInit();
            ((ISupportInitialize)txtItems.Properties).EndInit();
            ((ISupportInitialize)txtType.Properties).EndInit();
            ((ISupportInitialize)txtMode.Properties).EndInit();
            ((ISupportInitialize)peSucceed.Properties).EndInit();
            ((ISupportInitialize)gridControl1).EndInit();
            ((ISupportInitialize)hydroCheckItemViewModelBindingSource).EndInit();
            ((ISupportInitialize)gridView1).EndInit();
            ((ISupportInitialize)Root).EndInit();
            ((ISupportInitialize)layoutControlItem1).EndInit();
            ((ISupportInitialize)layoutControlItem2).EndInit();
            ((ISupportInitialize)layoutControlItem3).EndInit();
            ((ISupportInitialize)layoutControlItem4).EndInit();
            ((ISupportInitialize)emptySpaceItem1).EndInit();
            ((ISupportInitialize)layoutControlItem5).EndInit();
            ((ISupportInitialize)layoutControlItem6).EndInit();
            ((ISupportInitialize)layoutControlItem7).EndInit();
            ResumeLayout(false);
        }
        #endregion
        private DevExpress.XtraLayout.LayoutControl layoutControl1;
        private DevExpress.XtraGrid.GridControl gridControl1;
        private DevExpress.XtraGrid.Views.Grid.GridView gridView1;
        private DevExpress.XtraLayout.LayoutControlGroup Root;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem1;
        private BindingSource hydroCheckItemViewModelBindingSource;
        private DevExpress.XtraGrid.Columns.GridColumn colMode;
        private DevExpress.XtraGrid.Columns.GridColumn colType;
        private DevExpress.XtraGrid.Columns.GridColumn colCode;
        private DevExpress.XtraGrid.Columns.GridColumn colFailed;
        private DevExpress.XtraGrid.Columns.GridColumn colReason;
        private DevExpress.XtraEditors.TextEdit txtType;
        private DevExpress.XtraEditors.TextEdit txtMode;
        private DevExpress.XtraEditors.PictureEdit peSucceed;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem3;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
        private DevExpress.XtraLayout.EmptySpaceItem emptySpaceItem1;
        private DevExpress.XtraEditors.TextEdit txtFailedItems;
        private DevExpress.XtraEditors.TextEdit txtSucceedItems;
        private DevExpress.XtraEditors.TextEdit txtItems;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/05-check/01-control/HydroCheckResultCtrl.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,61 @@
namespace Yw.WinFrmUI
{
    public partial class HydroCheckResultCtrl : DevExpress.XtraEditors.XtraUserControl
    {
        public HydroCheckResultCtrl()
        {
            InitializeComponent();
            this.gridView1.SetNormalView(30);
            this.gridView1.RegistCustomDrawRowIndicator(40);
            this.gridView1.ShowFindPanel();
        }
        /// <summary>
        /// ç‚¹å‡»æž„件事件
        /// </summary>
        public event Action<string> HydroClickEvent;
        private List<HydroCheckItemViewModel> _allBindingList = null;
        /// <summary>
        /// ç»‘定数据
        /// </summary>
        public void SetBindingData(HydroCheckResult result)
        {
            if (result.Succeed)
            {
                this.peSucceed.Image = Yw.WinFrmUI.Hydro.Core.Properties.Resources.succeed_64;
            }
            else
            {
                this.peSucceed.Image = Yw.WinFrmUI.Hydro.Core.Properties.Resources.failed_64;
            }
            this.txtMode.EditValue = HydroCheckMode.Count();
            this.txtType.EditValue = HydroCheckType.Count();
            this.txtItems.EditValue = result.Items.Count;
            this.txtSucceedItems.EditValue = result.Items.Count(x => !x.Failed);
            this.txtFailedItems.EditValue = result.Items.Count(x => x.Failed);
            _allBindingList = new List<HydroCheckItemViewModel>();
            foreach (var item in result.Items)
            {
                var vm = new HydroCheckItemViewModel(item);
                _allBindingList.Add(vm);
            }
            this.hydroCheckItemViewModelBindingSource.DataSource = _allBindingList;
            this.hydroCheckItemViewModelBindingSource.ResetBindings(false);
        }
        //行点击
        private void gridView1_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e)
        {
            var row = this.gridView1.GetRow(e.RowHandle) as HydroCheckItemViewModel;
            if (row == null)
            {
                return;
            }
            this.HydroClickEvent?.Invoke(row.Code);
        }
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/05-check/01-control/HydroCheckResultCtrl.resx
ÎļþÃû´Ó WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/02-check/XhsProjectSimulationHydroCheckFailedCtrl.resx ÐÞ¸Ä
@@ -117,7 +117,7 @@
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <metadata name="xhsProjectSimulationHydroCheckFailedViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
  <metadata name="hydroCheckItemViewModelBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    <value>17, 17</value>
  </metadata>
</root>
WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-q3d/HydroQ3dViewPage.Designer.cs
WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-q3d/HydroQ3dViewPage.cs
WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-q3d/HydroQ3dViewPage.resx
WinFrmUI/Yw.WinFrmUI.Hydro.Core/07-l2d/HydroL2dViewPage.Designer.cs
WinFrmUI/Yw.WinFrmUI.Hydro.Core/07-l2d/HydroL2dViewPage.cs
WinFrmUI/Yw.WinFrmUI.Hydro.Core/07-l2d/HydroL2dViewPage.resx
WinFrmUI/Yw.WinFrmUI.Hydro.Core/08-l3d/HydroL3dViewPage.Designer.cs
WinFrmUI/Yw.WinFrmUI.Hydro.Core/08-l3d/HydroL3dViewPage.cs
WinFrmUI/Yw.WinFrmUI.Hydro.Core/08-l3d/HydroL3dViewPage.resx
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Properties/DataSources/Yw.WinFrmUI.HydroCheckItemViewModel.datasource
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
    This file is automatically generated by Visual Studio. It is
    used to store generic object data source configuration information.
    Renaming the file extension or editing the content of this file may
    cause the file to be unrecognizable by the program.
-->
<GenericObjectDataSource DisplayName="HydroCheckItemViewModel" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
  <TypeInfo>Yw.WinFrmUI.HydroCheckItemViewModel, Yw.WinFrmUI.Hydro.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
</GenericObjectDataSource>
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Properties/Resources.Designer.cs
@@ -59,5 +59,45 @@
                resourceCulture = value;
            }
        }
        /// <summary>
        ///   æŸ¥æ‰¾ System.Drawing.Bitmap ç±»åž‹çš„æœ¬åœ°åŒ–资源。
        /// </summary>
        internal static System.Drawing.Bitmap failed_128 {
            get {
                object obj = ResourceManager.GetObject("failed_128", resourceCulture);
                return ((System.Drawing.Bitmap)(obj));
            }
        }
        /// <summary>
        ///   æŸ¥æ‰¾ System.Drawing.Bitmap ç±»åž‹çš„æœ¬åœ°åŒ–资源。
        /// </summary>
        internal static System.Drawing.Bitmap failed_64 {
            get {
                object obj = ResourceManager.GetObject("failed_64", resourceCulture);
                return ((System.Drawing.Bitmap)(obj));
            }
        }
        /// <summary>
        ///   æŸ¥æ‰¾ System.Drawing.Bitmap ç±»åž‹çš„æœ¬åœ°åŒ–资源。
        /// </summary>
        internal static System.Drawing.Bitmap succeed_128 {
            get {
                object obj = ResourceManager.GetObject("succeed_128", resourceCulture);
                return ((System.Drawing.Bitmap)(obj));
            }
        }
        /// <summary>
        ///   æŸ¥æ‰¾ System.Drawing.Bitmap ç±»åž‹çš„æœ¬åœ°åŒ–资源。
        /// </summary>
        internal static System.Drawing.Bitmap succeed_64 {
            get {
                object obj = ResourceManager.GetObject("succeed_64", resourceCulture);
                return ((System.Drawing.Bitmap)(obj));
            }
        }
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Properties/Resources.resx
@@ -117,4 +117,17 @@
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
  <data name="failed_128" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\failed_128.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  </data>
  <data name="failed_64" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\failed_64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  </data>
  <data name="succeed_128" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\succeed_128.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  </data>
  <data name="succeed_64" type="System.Resources.ResXFileRef, System.Windows.Forms">
    <value>..\Resources\succeed_64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
  </data>
</root>
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Resources/failed_128.png
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Resources/failed_64.png
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Resources/succeed_128.png
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Resources/succeed_64.png
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj
@@ -10,7 +10,7 @@
  <ItemGroup>
    <PackageReference Include="DevExpress.Win.Design" Version="23.2.4" />
    <PackageReference Include="Yw.BLL.Basic.Core" Version="3.2.8" />
    <PackageReference Include="Yw.BLL.Hydro.Core" Version="3.2.6" />
    <PackageReference Include="Yw.BLL.Hydro.Core" Version="3.2.7" />
  </ItemGroup>
  <ItemGroup>
@@ -79,10 +79,10 @@
    <Compile Update="04-parter\17-pipe\HydroPipeListCtrl.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="06-l2d\HydroL2dViewPage.cs">
    <Compile Update="07-l2d\HydroL2dViewPage.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="07-l3d\HydroL3dViewPage.cs">
    <Compile Update="08-l3d\HydroL3dViewPage.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="Properties\Resources.Designer.cs">
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj.user
@@ -28,7 +28,10 @@
    <Compile Update="04-parter\03-nozzle\HydroNozzleListCtrl.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="05-q3d\HydroQ3dViewPage.cs">
    <Compile Update="05-check\01-control\HydroCheckResultCtrl.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="06-q3d\HydroQ3dViewPage.cs">
      <SubType>UserControl</SubType>
    </Compile>
  </ItemGroup>