duheng
2024-09-20 57051b41eb245cd3dc68ed9167f492df5de9d04c
冲突
已修改14个文件
已添加5个文件
771 ■■■■ 文件已修改
Desktop/HStation.Desktop.Xhs.Core/Program.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/00-core/ImportXhsProjectHelper.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-scheme/03-hydraulic-simulation/XhsSchemeHydraulicSimulationPage.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/01-property/XhsProjectSimulationPropertyCtrl.cs 134 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.Designer.cs 88 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.cs 113 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Core/11-global/GlobalParas.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/HydroCurve.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/00-core/HydroParterPropertyViewModelBuilder.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/03-link/02-pump/HydroPumpPropertyViewModel.cs 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/06-curve/HydroCurveViewCtrl.Designer.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/06-curve/HydroCurveViewCtrl.cs 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/06-curve/HydroCurveViewCtrl.resx 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/06-curve/HydroCurveViewDlg.Designer.cs 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/06-curve/HydroCurveViewDlg.cs 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/06-curve/HydroCurveViewDlg.resx 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/HydroParterPropertyCtrl.cs 104 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Properties/DataSources/Yw.WinFrmUI.HydroCurvePointViewModel.datasource 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj.user 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Desktop/HStation.Desktop.Xhs.Core/Program.cs
@@ -63,7 +63,8 @@
                // Yw.FileFolderZipHelper.Zip(@"C:\Users\ZKC\Desktop\循环水用例", @"C:\Users\ZKC\Desktop\循环水用例.ywrvt");
                //Yw.FileFolderZipHelper.Zip(@"C:\Users\Eventech\Desktop\循环水用例", @"C:\Users\Eventech\Desktop\循环水用例.ywrvt");
                Yw.FileFolderZipHelper.Zip(@"C:\Users\admin\Desktop\居家办公工作\循环水用例", @"C:\Users\admin\Desktop\居家办公工作\循环水用例.ywrvt");
                // Yw.FileFolderZipHelper.Zip(@"C:\Users\admin\Desktop\居家办公工作\循环水用例", @"C:\Users\admin\Desktop\居家办公工作\循环水用例.ywrvt");
                //Yw.FileFolderZipHelper.Zip(@"C:\Users\admin\Desktop\居家办公工作\简单用例", @"C:\Users\admin\Desktop\居家办公工作\简单用例.ywrvt");
                //var json = RevitTestHelper.GenerateJson();
@@ -104,5 +105,7 @@
            Yw.LogHelper.Error("系统出现未知异常,ERROR:255", ex);
            MessageBox.Show($"系统出现未知异常,请重启系统!\r\n{ex.Message}");
        }
    }
}
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/00-core/ImportXhsProjectHelper.cs
@@ -244,7 +244,8 @@
            }
            // var bimfaceId = await Yw.WinFrmUI.BimfaceHelper.UploadFile(rvtFileInfo.FullName);//上传
            var bimfaceId = 10000878332030; //测试用例
            //var bimfaceId = 10000878332030; //测试用例
            var bimfaceId = 10000870453147;//简单用例
            if (bimfaceId < 1)
            {
                feedBackMsg?.Invoke("Revit模型文件上传失败!!!", Color.Red);
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-scheme/03-hydraulic-simulation/XhsSchemeHydraulicSimulationPage.cs
@@ -40,7 +40,7 @@
                return;
            }
            _hydro = await new Yw.BLL.HydroModelInfo().GetByID(hydroRelation.ModelID);
            this.xhsProjectSimulationPropertyCtrl1.SetBindingData(_hydro);
            // this.xhsProjectSimulationPropertyCtrl1.SetBindingData(_hydro);
        }
        /// <summary>
WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/01-property/XhsProjectSimulationPropertyCtrl.cs
@@ -10,38 +10,34 @@
        public XhsProjectSimulationPropertyCtrl()
        {
            InitializeComponent();
            this.hydroParterPropertyCtrl1.PropertyValueChangedEvent += HydroParterPropertyCtrl1_PropertyValueChangedEvent;
            this.hydroParterPropertyCtrl1.GetHydroInfoEvent += HydroParterPropertyCtrl1_GetHydroInfoEvent;
            this.hydroParterPropertyCtrl1.SelectCurveEvent += HydroParterPropertyCtrl1_SelectCurveEvent;
            this.hydroParterPropertyCtrl1.SelectPatternEvent += HydroParterPropertyCtrl1_SelectPatternEvent;
            this.hydroParterPropertyCtrl1.PropertyValueChangedEvent += HydroParterPropertyCtrl1_PropertyValueChangedEvent;
            this.hydroParterPropertyCtrl1.PropertyValueChangingEvent += HydroParterPropertyCtrl1_PropertyValueChangingEvent;
        }
        private Yw.Model.HydroModelInfo _hydroInfo = null;
        /// <summary>
        /// ç»‘定数据
        /// èŽ·å–æ°´åŠ›ä¿¡æ¯äº‹ä»¶
        /// </summary>
        public void SetBindingData(Yw.Model.HydroModelInfo hydroInfo)
        {
            _hydroInfo = hydroInfo;
        }
        public event Func<Yw.Model.HydroModelInfo> GetHydroInfoEvent;
        /// <summary>
        /// é€‰æ‹©ç»„ä»¶
        /// </summary>
        public void SelectParter(long id)
        {
            if (_hydroInfo == null)
            var hydroInfo = GetHydroInfoEvent?.Invoke();
            if (hydroInfo == null)
            {
                this.hydroParterPropertyCtrl1.SelectedObject = null;
                return;
            }
            var allParterList = _hydroInfo.GetAllParters();
            var allParterList = hydroInfo.GetAllParters();
            var parter = allParterList.Find(x => x.ID == id);
            if (parter == null)
            {
                this.hydroParterPropertyCtrl1.SelectedObject = null;
                return;
            }
            var vm = Yw.WinFrmUI.HydroParterPropertyViewModelBuilder.CreateViewModel(parter, allParterList);
            this.hydroParterPropertyCtrl1.SelectedObject = vm;
        }
@@ -51,18 +47,14 @@
        /// </summary>
        public void SelectParter(string code)
        {
            if (_hydroInfo == null)
            var hydroInfo = GetHydroInfoEvent?.Invoke();
            if (hydroInfo == null)
            {
                this.hydroParterPropertyCtrl1.SelectedObject = null;
                return;
            }
            var allParterList = _hydroInfo.GetAllParters();
            var allParterList = hydroInfo.GetAllParters();
            var parter = allParterList.Find(x => x.Code == code);
            if (parter == null)
            {
                this.hydroParterPropertyCtrl1.SelectedObject = null;
                return;
            }
            var vm = Yw.WinFrmUI.HydroParterPropertyViewModelBuilder.CreateViewModel(parter, allParterList);
            this.hydroParterPropertyCtrl1.SelectedObject = vm;
        }
@@ -74,11 +66,6 @@
        /// <param name="allParterList"></param>
        public void SelectParter(Yw.Model.HydroParterInfo parter, List<Yw.Model.HydroParterInfo> allParterList)
        {
            if (parter == null)
            {
                this.hydroParterPropertyCtrl1.SelectedObject = null;
                return;
            }
            var vm = Yw.WinFrmUI.HydroParterPropertyViewModelBuilder.CreateViewModel(parter, allParterList);
            this.hydroParterPropertyCtrl1.SelectedObject = vm;
        }
@@ -97,74 +84,58 @@
            this.hydroParterPropertyCtrl1.UpdateRows();
        }
        //属性发生改变
        private void HydroParterPropertyCtrl1_PropertyValueChangedEvent(HydroParterPropertyViewModel obj)
        //获取水力信息事件
        private Yw.Model.HydroModelInfo HydroParterPropertyCtrl1_GetHydroInfoEvent()
        {
            if (obj == null)
            {
                return;
            }
            if (_hydroInfo == null)
            {
                return;
            }
            var allParterList = _hydroInfo.GetAllParters();
            var parter = allParterList?.Find(x => x.ID == obj.ID);
            if (parter == null)
            {
                return;
            }
            parter.UpdateProperty(allParterList, obj);
            var hydroInfo = GetHydroInfoEvent?.Invoke();
            return hydroInfo;
        }
        //选择曲线
        private void HydroParterPropertyCtrl1_SelectCurveEvent(HydroParterPropertyViewModel propViewModel, string curveType)
        private bool HydroParterPropertyCtrl1_SelectCurveEvent(HydroParterPropertyViewModel propViewModel, string curveType)
        {
            //这里 dbid modeltype
            //返回 dbid curveid æ›²çº¿ä¿¡æ¯
            switch (curveType)
            {
                case Yw.WinFrmUI.HydroCurve.Pump:
                    {
                        var pumpPropertyViewModel = propViewModel as HydroPumpPropertyViewModel;
                        var dbId = pumpPropertyViewModel.DbId;
                        var modelType = pumpPropertyViewModel.ModelType;
                        var dlg = new PumpMainCurveChoiceDlg();
                        dlg.SetBindingData(dbId, modelType);
                        dlg.CurveinfoEvent += (dbid, curveid, curveinfo) =>
                        {
                        };
                        dlg.ShowDialog();
                        return true;
                    }
                case Yw.WinFrmUI.HydroCurve.PumpQH:
                    {
                        var pumpPropertyViewModel = propViewModel as HydroPumpPropertyViewModel;
                        var dbId = pumpPropertyViewModel.DbId;
                        var modelType = pumpPropertyViewModel.ModelType;
                        var dlg = new PumpMainCurveChoiceDlg();
                        dlg.SetBindingData(dbId, modelType);
                        dlg.CurveinfoEvent += (dbid, curveid, curveinfo) =>
                        {
                        };
                        dlg.ShowDialog();
                        return false;
                    }
                    break;
                case Yw.WinFrmUI.HydroCurve.PumpQP:
                    {
                        return false;
                    }
                case Yw.WinFrmUI.HydroCurve.PumpQE:
                    {
                        var pumpPropertyViewModel = propViewModel as HydroPumpPropertyViewModel;
                        var dbId = pumpPropertyViewModel.DbId;
                        var modelType = pumpPropertyViewModel.ModelType;
                        var dlg = new PumpMainCurveChoiceDlg();
                        dlg.SetBindingData(dbId, modelType);
                        dlg.CurveinfoEvent += (dbid, curveid, curveinfo) =>
                        {
                        };
                        dlg.ShowDialog();
                        return false;
                    }
                    break;
                case Yw.WinFrmUI.HydroCurve.Valve:
                    {
                        return true;
                    }
                case Yw.WinFrmUI.HydroCurve.ValveQL:
                    {
                        //
                        return false;
                    }
                    break;
                default: break;
            }
            //  XtraMessageBox.Show($"{propViewModel.Name}-{curveType}");
            return false;
        }
        //选择模式
        private void HydroParterPropertyCtrl1_SelectPatternEvent(HydroParterPropertyViewModel propViewModel, string patternType)
        private bool HydroParterPropertyCtrl1_SelectPatternEvent(HydroParterPropertyViewModel propViewModel, string patternType)
        {
            switch (patternType)
            {
@@ -180,7 +151,20 @@
                default: break;
            }
            XtraMessageBox.Show($"{propViewModel.Name}-{patternType}");
            return true;
        }
        //属性发生改变
        private bool HydroParterPropertyCtrl1_PropertyValueChangedEvent(HydroParterPropertyViewModel obj)
        {
            return false;
        }
        //属性正在发生改变
        private bool HydroParterPropertyCtrl1_PropertyValueChangingEvent(HydroParterPropertyViewModel arg)
        {
            return false;
        }
    }
}
WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.Designer.cs
@@ -58,6 +58,9 @@
            docPnlProperty = new DevExpress.XtraBars.Docking.DockPanel();
            dockPanel1_Container = new DevExpress.XtraBars.Docking.ControlContainer();
            xhsProjectSimulationPropertyCtrl1 = new XhsProjectSimulationPropertyCtrl();
            docPnlHydroParterList = new DevExpress.XtraBars.Docking.DockPanel();
            controlContainer3 = new DevExpress.XtraBars.Docking.ControlContainer();
            hydroParterListCtrl1 = new HydroParterListCtrl();
            docPnlHydroCalcu = new DevExpress.XtraBars.Docking.DockPanel();
            controlContainer2 = new DevExpress.XtraBars.Docking.ControlContainer();
            xhsProjectSimulationHydroCalcuFailedCtrl1 = new XhsProjectSimulationHydroCalcuFailedCtrl();
@@ -73,6 +76,8 @@
            ((ISupportInitialize)dockManager1).BeginInit();
            docPnlProperty.SuspendLayout();
            dockPanel1_Container.SuspendLayout();
            docPnlHydroParterList.SuspendLayout();
            controlContainer3.SuspendLayout();
            docPnlHydroCalcu.SuspendLayout();
            controlContainer2.SuspendLayout();
            docPnlHydroCheck.SuspendLayout();
@@ -92,7 +97,7 @@
            ribbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.False;
            ribbonControl1.ShowExpandCollapseButton = DevExpress.Utils.DefaultBoolean.False;
            ribbonControl1.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.ShowOnMultiplePages;
            ribbonControl1.Size = new Size(1051, 101);
            ribbonControl1.Size = new Size(1161, 128);
            ribbonControl1.ToolbarLocation = DevExpress.XtraBars.Ribbon.RibbonQuickAccessToolbarLocation.Hidden;
            // 
            // barBtnHydroCheck
@@ -235,12 +240,12 @@
            tabPane1.Controls.Add(pageBimface);
            tabPane1.Controls.Add(pageQ3d);
            tabPane1.Dock = DockStyle.Fill;
            tabPane1.Location = new Point(0, 101);
            tabPane1.Location = new Point(0, 128);
            tabPane1.Name = "tabPane1";
            tabPane1.Pages.AddRange(new DevExpress.XtraBars.Navigation.NavigationPageBase[] { pageBimface, pageQ3d });
            tabPane1.RegularSize = new Size(776, 161);
            tabPane1.RegularSize = new Size(886, 208);
            tabPane1.SelectedPage = pageBimface;
            tabPane1.Size = new Size(776, 161);
            tabPane1.Size = new Size(886, 208);
            tabPane1.TabIndex = 1;
            tabPane1.Text = "tabPane1";
            // 
@@ -249,14 +254,14 @@
            pageBimface.Caption = "三维模型";
            pageBimface.Controls.Add(xhsProjectSimulationBimfaceCtrl1);
            pageBimface.Name = "pageBimface";
            pageBimface.Size = new Size(776, 128);
            pageBimface.Size = new Size(886, 175);
            // 
            // xhsProjectSimulationBimfaceCtrl1
            // 
            xhsProjectSimulationBimfaceCtrl1.Dock = DockStyle.Fill;
            xhsProjectSimulationBimfaceCtrl1.Location = new Point(0, 0);
            xhsProjectSimulationBimfaceCtrl1.Name = "xhsProjectSimulationBimfaceCtrl1";
            xhsProjectSimulationBimfaceCtrl1.Size = new Size(776, 128);
            xhsProjectSimulationBimfaceCtrl1.Size = new Size(886, 175);
            xhsProjectSimulationBimfaceCtrl1.TabIndex = 0;
            xhsProjectSimulationBimfaceCtrl1.ClickParterEvent += xhsProjectSimulationBimfaceCtrl1_ClickParterEvent;
            // 
@@ -278,7 +283,7 @@
            // dockManager1
            // 
            dockManager1.Form = this;
            dockManager1.RootPanels.AddRange(new DevExpress.XtraBars.Docking.DockPanel[] { docPnlProperty, docPnlHydroCalcu, docPnlHydroCheck });
            dockManager1.RootPanels.AddRange(new DevExpress.XtraBars.Docking.DockPanel[] { docPnlProperty, docPnlHydroParterList, docPnlHydroCalcu, docPnlHydroCheck });
            dockManager1.TopZIndexControls.AddRange(new string[] { "DevExpress.XtraBars.BarDockControl", "DevExpress.XtraBars.StandaloneBarDockControl", "System.Windows.Forms.MenuStrip", "System.Windows.Forms.StatusStrip", "System.Windows.Forms.StatusBar", "DevExpress.XtraBars.Ribbon.RibbonStatusBar", "DevExpress.XtraBars.Ribbon.RibbonControl", "DevExpress.XtraBars.Navigation.OfficeNavigationBar", "DevExpress.XtraBars.Navigation.TileNavPane", "DevExpress.XtraBars.TabFormControl", "DevExpress.XtraBars.FluentDesignSystem.FluentDesignFormControl", "DevExpress.XtraBars.ToolbarForm.ToolbarFormControl" });
            // 
            // docPnlProperty
@@ -286,10 +291,10 @@
            docPnlProperty.Controls.Add(dockPanel1_Container);
            docPnlProperty.Dock = DevExpress.XtraBars.Docking.DockingStyle.Right;
            docPnlProperty.ID = new Guid("cffe2560-3445-4488-83cf-b9e4b936ff18");
            docPnlProperty.Location = new Point(776, 101);
            docPnlProperty.Location = new Point(886, 128);
            docPnlProperty.Name = "docPnlProperty";
            docPnlProperty.OriginalSize = new Size(275, 200);
            docPnlProperty.Size = new Size(275, 649);
            docPnlProperty.Size = new Size(275, 960);
            docPnlProperty.Text = "属性";
            // 
            // dockPanel1_Container
@@ -297,7 +302,7 @@
            dockPanel1_Container.Controls.Add(xhsProjectSimulationPropertyCtrl1);
            dockPanel1_Container.Location = new Point(4, 26);
            dockPanel1_Container.Name = "dockPanel1_Container";
            dockPanel1_Container.Size = new Size(268, 620);
            dockPanel1_Container.Size = new Size(268, 931);
            dockPanel1_Container.TabIndex = 0;
            // 
            // xhsProjectSimulationPropertyCtrl1
@@ -305,8 +310,39 @@
            xhsProjectSimulationPropertyCtrl1.Dock = DockStyle.Fill;
            xhsProjectSimulationPropertyCtrl1.Location = new Point(0, 0);
            xhsProjectSimulationPropertyCtrl1.Name = "xhsProjectSimulationPropertyCtrl1";
            xhsProjectSimulationPropertyCtrl1.Size = new Size(268, 620);
            xhsProjectSimulationPropertyCtrl1.Size = new Size(268, 931);
            xhsProjectSimulationPropertyCtrl1.TabIndex = 0;
            xhsProjectSimulationPropertyCtrl1.GetHydroInfoEvent += xhsProjectSimulationPropertyCtrl1_GetHydroInfoEvent;
            //
            // docPnlHydroParterList
            //
            docPnlHydroParterList.Controls.Add(controlContainer3);
            docPnlHydroParterList.Dock = DevExpress.XtraBars.Docking.DockingStyle.Bottom;
            docPnlHydroParterList.FloatVertical = true;
            docPnlHydroParterList.ID = new Guid("facc1bde-3cf7-455c-b59c-8377daa6b90e");
            docPnlHydroParterList.Location = new Point(0, 797);
            docPnlHydroParterList.Name = "docPnlHydroParterList";
            docPnlHydroParterList.OriginalSize = new Size(200, 291);
            docPnlHydroParterList.Size = new Size(886, 291);
            docPnlHydroParterList.Text = "构件明细";
            //
            // controlContainer3
            //
            controlContainer3.Controls.Add(hydroParterListCtrl1);
            controlContainer3.Location = new Point(3, 27);
            controlContainer3.Name = "controlContainer3";
            controlContainer3.Size = new Size(880, 261);
            controlContainer3.TabIndex = 0;
            //
            // hydroParterListCtrl1
            //
            hydroParterListCtrl1.Dock = DockStyle.Fill;
            hydroParterListCtrl1.HidePageWhenListIsNull = true;
            hydroParterListCtrl1.Location = new Point(0, 0);
            hydroParterListCtrl1.Name = "hydroParterListCtrl1";
            hydroParterListCtrl1.Size = new Size(880, 261);
            hydroParterListCtrl1.TabIndex = 0;
            hydroParterListCtrl1.HydroClickEvent += hydroParterListCtrl1_HydroClickEvent;
            // 
            // docPnlHydroCalcu
            // 
@@ -314,10 +350,10 @@
            docPnlHydroCalcu.Dock = DevExpress.XtraBars.Docking.DockingStyle.Bottom;
            docPnlHydroCalcu.FloatVertical = true;
            docPnlHydroCalcu.ID = new Guid("ac7055c0-e9fe-40c2-bf51-83dde5710cd4");
            docPnlHydroCalcu.Location = new Point(0, 262);
            docPnlHydroCalcu.Location = new Point(0, 561);
            docPnlHydroCalcu.Name = "docPnlHydroCalcu";
            docPnlHydroCalcu.OriginalSize = new Size(200, 236);
            docPnlHydroCalcu.Size = new Size(776, 236);
            docPnlHydroCalcu.Size = new Size(886, 236);
            docPnlHydroCalcu.Text = "水力计算";
            // 
            // controlContainer2
@@ -325,7 +361,7 @@
            controlContainer2.Controls.Add(xhsProjectSimulationHydroCalcuFailedCtrl1);
            controlContainer2.Location = new Point(3, 27);
            controlContainer2.Name = "controlContainer2";
            controlContainer2.Size = new Size(770, 206);
            controlContainer2.Size = new Size(880, 206);
            controlContainer2.TabIndex = 0;
            // 
            // xhsProjectSimulationHydroCalcuFailedCtrl1
@@ -333,7 +369,7 @@
            xhsProjectSimulationHydroCalcuFailedCtrl1.Dock = DockStyle.Fill;
            xhsProjectSimulationHydroCalcuFailedCtrl1.Location = new Point(0, 0);
            xhsProjectSimulationHydroCalcuFailedCtrl1.Name = "xhsProjectSimulationHydroCalcuFailedCtrl1";
            xhsProjectSimulationHydroCalcuFailedCtrl1.Size = new Size(770, 206);
            xhsProjectSimulationHydroCalcuFailedCtrl1.Size = new Size(880, 206);
            xhsProjectSimulationHydroCalcuFailedCtrl1.TabIndex = 0;
            // 
            // docPnlHydroCheck
@@ -341,12 +377,12 @@
            docPnlHydroCheck.Controls.Add(controlContainer1);
            docPnlHydroCheck.Dock = DevExpress.XtraBars.Docking.DockingStyle.Bottom;
            docPnlHydroCheck.ID = new Guid("dee18895-8b3d-44cd-9001-28bee516095d");
            docPnlHydroCheck.Location = new Point(0, 262);
            docPnlHydroCheck.Location = new Point(0, 336);
            docPnlHydroCheck.Name = "docPnlHydroCheck";
            docPnlHydroCheck.OriginalSize = new Size(200, 252);
            docPnlHydroCheck.OriginalSize = new Size(200, 225);
            docPnlHydroCheck.SavedDock = DevExpress.XtraBars.Docking.DockingStyle.Bottom;
            docPnlHydroCheck.SavedIndex = 1;
            docPnlHydroCheck.Size = new Size(776, 252);
            docPnlHydroCheck.Size = new Size(886, 225);
            docPnlHydroCheck.Text = "水力校验";
            // 
            // controlContainer1
@@ -354,7 +390,7 @@
            controlContainer1.Controls.Add(xhsProjectSimulationHydroCheckFailedCtrl1);
            controlContainer1.Location = new Point(3, 27);
            controlContainer1.Name = "controlContainer1";
            controlContainer1.Size = new Size(770, 222);
            controlContainer1.Size = new Size(880, 195);
            controlContainer1.TabIndex = 0;
            // 
            // xhsProjectSimulationHydroCheckFailedCtrl1
@@ -362,7 +398,7 @@
            xhsProjectSimulationHydroCheckFailedCtrl1.Dock = DockStyle.Fill;
            xhsProjectSimulationHydroCheckFailedCtrl1.Location = new Point(0, 0);
            xhsProjectSimulationHydroCheckFailedCtrl1.Name = "xhsProjectSimulationHydroCheckFailedCtrl1";
            xhsProjectSimulationHydroCheckFailedCtrl1.Size = new Size(770, 222);
            xhsProjectSimulationHydroCheckFailedCtrl1.Size = new Size(880, 195);
            xhsProjectSimulationHydroCheckFailedCtrl1.TabIndex = 0;
            xhsProjectSimulationHydroCheckFailedCtrl1.HydroClickEvent += xhsProjectSimulationHydroCheckFailedCtrl1_HydroClickEvent;
            // 
@@ -378,13 +414,14 @@
            AutoScaleDimensions = new SizeF(7F, 14F);
            AutoScaleMode = AutoScaleMode.Font;
            Controls.Add(tabPane1);
            Controls.Add(docPnlHydroCalcu);
            Controls.Add(docPnlProperty);
            Controls.Add(docPnlHydroCheck);
            Controls.Add(docPnlHydroCalcu);
            Controls.Add(docPnlHydroParterList);
            Controls.Add(docPnlProperty);
            Controls.Add(ribbonControl1);
            Margin = new Padding(2);
            Name = "XhsProjectSimulationCorePage";
            Size = new Size(1051, 750);
            Size = new Size(1161, 1088);
            ((ISupportInitialize)ribbonControl1).EndInit();
            ((ISupportInitialize)tabPane1).EndInit();
            tabPane1.ResumeLayout(false);
@@ -393,6 +430,8 @@
            ((ISupportInitialize)dockManager1).EndInit();
            docPnlProperty.ResumeLayout(false);
            dockPanel1_Container.ResumeLayout(false);
            docPnlHydroParterList.ResumeLayout(false);
            controlContainer3.ResumeLayout(false);
            docPnlHydroCalcu.ResumeLayout(false);
            controlContainer2.ResumeLayout(false);
            docPnlHydroCheck.ResumeLayout(false);
@@ -439,5 +478,8 @@
        private DevExpress.XtraBars.Docking.DockPanel docPnlHydroCalcu;
        private DevExpress.XtraBars.Docking.ControlContainer controlContainer2;
        private XhsProjectSimulationHydroCalcuFailedCtrl xhsProjectSimulationHydroCalcuFailedCtrl1;
        private DevExpress.XtraBars.Docking.DockPanel docPnlHydroParterList;
        private DevExpress.XtraBars.Docking.ControlContainer controlContainer3;
        private HydroParterListCtrl hydroParterListCtrl1;
    }
}
WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.cs
@@ -2,6 +2,7 @@
using HStation.WinFrmUI.Xhs;
using HStation.WinFrmUI.Xhs.Core;
using NPOI.SS.Formula.Functions;
using Yw.WinFrmUI.HydroL2d;
namespace HStation.WinFrmUI
{
@@ -14,6 +15,7 @@
            this.PageTitle.HeaderSvgImage = this.svgImg32[0];
            this.docPnlHydroCheck.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden;
            this.docPnlHydroCalcu.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden;
            this.docPnlHydroParterList.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden;
        }
        private HStation.Vmo.XhsProjectVmo _project = null;//项目
@@ -52,7 +54,6 @@
                    .GetDefaultByObjectTypeAndObjectIDOfPurpose(HStation.Xhs.DataType.XhsProjectSite, _projectSite.ID, HStation.Xhs.Purpose.Simulation);
                _hydroInfo = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance.GetByID(hydroRelation.ModelID);
            }
            this.xhsProjectSimulationPropertyCtrl1.SetBindingData(_hydroInfo);
            this.xhsProjectSimulationQ3dCtrl1.SetBindingData(_hydroInfo);
        }
@@ -70,7 +71,11 @@
            await this.xhsProjectSimulationBimfaceCtrl1.SetBindingData(_project, _projectSite);
        }
        #region æ¨¡åž‹
        //属性面板获取水力信息事件
        private Yw.Model.HydroModelInfo xhsProjectSimulationPropertyCtrl1_GetHydroInfoEvent()
        {
            return _hydroInfo;
        }
        //一键显隐
        private async void barBtnShowHide_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
@@ -95,10 +100,6 @@
            }
        }
        #endregion æ¨¡åž‹
        #region æ°´åŠ›
        //水力验证
        private void barBtnHydroCheck_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
@@ -106,8 +107,9 @@
            {
                return;
            }
            this.docPnlHydroCalcu.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden;
            this.docPnlHydroCheck.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden;
            this.docPnlHydroCalcu.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden;
            this.docPnlHydroParterList.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden;
            var netWork = Yw.Hydro.ParseHelper.ToNetwork(_hydroInfo);
            _checkResult = netWork.Check();
@@ -127,8 +129,9 @@
            {
                return;
            }
            this.docPnlHydroCalcu.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden;
            this.docPnlHydroCheck.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden;
            this.docPnlHydroCalcu.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden;
            this.docPnlHydroParterList.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden;
            var netWork = Yw.Hydro.ParseHelper.ToNetwork(_hydroInfo);
            _calcuResult = netWork.Calcu();
@@ -145,16 +148,16 @@
        //水力构件列表
        private void barBtnHydroParterList_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var dlg = new HydroParterListDlg();
            dlg.TopMost = true;
            dlg.HydroClickEvent += async (parter) =>
            if (_hydroInfo == null)
            {
                _parter = parter;
                await this.xhsProjectSimulationBimfaceCtrl1.SetSelectedComponents(new List<string>() { parter.Code });
                ShowProperty();
            };
            dlg.SetBindingData(_hydroInfo);
            dlg.Show();
                return;
            }
            this.docPnlHydroCheck.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden;
            this.docPnlHydroCalcu.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden;
            this.docPnlHydroParterList.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden;
            this.hydroParterListCtrl1.SetBindingData(_hydroInfo);
            this.docPnlHydroParterList.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Visible;
        }
        //导出水力INP文件
@@ -237,10 +240,6 @@
            }
        }
        #endregion æ°´åŠ›
        #region æ›´å¤š
        //保存
        private async void barBtnSave_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
@@ -255,74 +254,16 @@
                return;
            }
            _hydroInfo = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance.GetByID(id);
            //     this.xhsProjectSimulationBimfaceCtrl1.
            //this.xhsProjectSimulationPropertyCtrl1.SetBindingData(_hydroInfo);
            TipFormHelper.ShowSucceed("保存成功!");
        }
        #endregion æ›´å¤š
        #region è‡ªåŠ¨åŒ¹é…
        //自动匹配
        private void barBtnAllAutoMatching_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            //   _hydroInfo
            var pump = _hydroInfo.Pumps;
            var threelinks = _hydroInfo.Threelinks;
            var aa = new AssetsAutoMatchingInputViewModel();
            foreach (var item in pump)
            {
                aa = new AssetsAutoMatchingInputViewModel
                {
                    PumpMatchingModels = new List<PumpMatchingViewModel>
                    {
             new PumpMatchingViewModel
                {
        RatedH = item.RatedH, // å‡è®¾item已经定义并且包含了RatedH等属性
        RatedP = item.RatedP,
        RatedQ = item.RatedQ,
        RatedN = item.RatedN,
        ModelType=item.ModelType,
        DbID=item.DbId,
        DbLocked=item.DbLocked
                }
                     }
                };
            }
            foreach (var item in threelinks)
            {
                aa = new AssetsAutoMatchingInputViewModel
                {
                    ThreeLinkMatchingModels = new List<ThreeLinkMatchingViewModel>
                    {
                        new ThreeLinkMatchingViewModel
                        {
                            Caliber=item.Caliber,
                            Material=item.Material,
                            ModelType=item.ModelType,
                            DbLocked=item.DbLocked,
                            ID=item.ID,
                            Code=item.Code,
                            MinorLoss=item.MinorLoss
                        },
                           new ThreeLinkMatchingViewModel
                        {
                            Caliber="11",
                            Material="22",
                            ModelType=item.ModelType,
                            DbLocked=item.DbLocked,
                            ID=item.ID,
                            Code=item.Code,
                            MinorLoss=item.MinorLoss
                        }
                    }
                };
            }
            var dlg = new AssetsAutoMatchingMainDlg(aa);
            var dlg = new AssetsAutoMatchingMainDlg(new AssetsAutoMatchingInputViewModel());
            dlg.ShowDialog();
        }
        #endregion è‡ªåŠ¨åŒ¹é…
        private void BtnPerformChart_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
@@ -342,5 +283,15 @@
            _parter = allParterList.Find(x => x.Code == obj);
            ShowProperty();
        }
        //水力构件明细面板点击事件
        private async void hydroParterListCtrl1_HydroClickEvent(Yw.Model.HydroParterInfo parter)
        {
            _parter = parter;
            await this.xhsProjectSimulationBimfaceCtrl1.SetSelectedComponents(new List<string>() { parter.Code });
            ShowProperty();
        }
    }
}
WinFrmUI/Yw.WinFrmUI.Core/11-global/GlobalParas.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
namespace Yw.WinFrmUI
{
    /// <summary>
    /// å…¨å±€å‚æ•°
    /// </summary>
    public class GlobalParas
    {
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/00-core/HydroCurve.cs
@@ -6,7 +6,7 @@
    public class HydroCurve
    {
        /// <summary>
        /// æ°´æ³µ
        /// æ°´æ³µæ›²çº¿
        /// </summary>
        public const string Pump = "Pump";
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/00-core/HydroParterPropertyViewModelBuilder.cs
@@ -13,6 +13,10 @@
        /// <returns></returns>
        public static HydroParterPropertyViewModel CreateViewModel(this Yw.Model.HydroParterInfo rhs, List<Yw.Model.HydroParterInfo> allParterList)
        {
            if (rhs == null)
            {
                return default;
            }
            HydroParterPropertyViewModel vm = null;
            switch (rhs.Catalog)
            {
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/03-link/02-pump/HydroPumpPropertyViewModel.cs
@@ -81,13 +81,23 @@
        [DisplayUnit("r/min")]
        public double? RatedN { get; set; }
        /// <summary>
        /// æ€§èƒ½æ›²çº¿
        /// </summary>
        [Category("数据")]
        [DisplayName("性能曲线")]
        [PropertyOrder(106)]
        [IsHydroCurvePro(HydroCurve.Pump)]
        [Browsable(true)]
        public string Curve { get; set; }
        /// <summary>
        /// æµé‡æ‰¬ç¨‹æ›²çº¿
        /// </summary>
        [Category("数据")]
        [DisplayName("流量扬程曲线")]
        [PropertyOrder(105)]
        [PropertyOrder(106)]
        [IsHydroCurvePro(HydroCurve.PumpQH)]
        [Browsable(true)]
        public string CurveQH { get; set; }
@@ -97,7 +107,7 @@
        /// </summary>
        [Category("数据")]
        [DisplayName("流量功率曲线")]
        [PropertyOrder(106)]
        [PropertyOrder(107)]
        [IsHydroCurvePro(HydroCurve.PumpQP)]
        [Browsable(true)]
        public string CurveQP { get; set; }
@@ -107,7 +117,7 @@
        /// </summary>
        [Category("数据")]
        [DisplayName("流量效率曲线")]
        [PropertyOrder(107)]
        [PropertyOrder(108)]
        [IsHydroCurvePro(HydroCurve.PumpQE)]
        [Browsable(true)]
        public string CurveQE { get; set; }
@@ -117,7 +127,7 @@
        /// </summary>
        [Category("数据")]
        [DisplayName("转速比")]
        [PropertyOrder(108)]
        [PropertyOrder(109)]
        [Browsable(true)]
        public double? SpeedRatio { get; set; }
@@ -126,7 +136,7 @@
        /// </summary>
        [Category("数据")]
        [DisplayName("转速比模式")]
        [PropertyOrder(109)]
        [PropertyOrder(110)]
        [Browsable(true)]
        public string SpeedRatioPattern { get; set; }
@@ -135,7 +145,7 @@
        /// </summary>
        [Category("数据")]
        [DisplayName("能耗价格")]
        [PropertyOrder(110)]
        [PropertyOrder(111)]
        [Browsable(true)]
        public double? Price { get; set; }
@@ -144,7 +154,7 @@
        /// </summary>
        [Category("数据")]
        [DisplayName("价格模式")]
        [PropertyOrder(111)]
        [PropertyOrder(112)]
        [Browsable(true)]
        public string PricePattern { get; set; }
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/06-curve/HydroCurveViewCtrl.Designer.cs
@@ -28,18 +28,22 @@
        /// </summary>
        private void InitializeComponent()
        {
            components = new Container();
            DevExpress.XtraCharts.XYDiagram xyDiagram1 = new DevExpress.XtraCharts.XYDiagram();
            DevExpress.XtraCharts.Series series1 = new DevExpress.XtraCharts.Series();
            DevExpress.XtraCharts.SplineSeriesView splineSeriesView1 = new DevExpress.XtraCharts.SplineSeriesView();
            chartControl1 = new DevExpress.XtraCharts.ChartControl();
            hydroCurvePointViewModelBindingSource = new BindingSource(components);
            ((ISupportInitialize)chartControl1).BeginInit();
            ((ISupportInitialize)xyDiagram1).BeginInit();
            ((ISupportInitialize)series1).BeginInit();
            ((ISupportInitialize)splineSeriesView1).BeginInit();
            ((ISupportInitialize)hydroCurvePointViewModelBindingSource).BeginInit();
            SuspendLayout();
            // 
            // chartControl1
            // 
            chartControl1.DataSource = hydroCurvePointViewModelBindingSource;
            xyDiagram1.AxisX.Title.Visibility = DevExpress.Utils.DefaultBoolean.Default;
            xyDiagram1.AxisX.VisibleInPanesSerializable = "-1";
            xyDiagram1.AxisY.Title.Visibility = DevExpress.Utils.DefaultBoolean.Default;
@@ -50,8 +54,10 @@
            chartControl1.Legend.Visibility = DevExpress.Utils.DefaultBoolean.False;
            chartControl1.Location = new Point(0, 0);
            chartControl1.Name = "chartControl1";
            series1.Name = "SeriesPoint";
            series1.ArgumentDataMember = "X";
            series1.Name = "Series1";
            series1.SeriesID = 2;
            series1.ValueDataMembersSerializable = "Y";
            series1.View = splineSeriesView1;
            chartControl1.SeriesSerializable = new DevExpress.XtraCharts.Series[]
    {
@@ -59,6 +65,10 @@
    };
            chartControl1.Size = new Size(749, 553);
            chartControl1.TabIndex = 1;
            //
            // hydroCurvePointViewModelBindingSource
            //
            hydroCurvePointViewModelBindingSource.DataSource = typeof(HydroCurvePointViewModel);
            // 
            // HydroCurveViewCtrl
            // 
@@ -71,11 +81,13 @@
            ((ISupportInitialize)splineSeriesView1).EndInit();
            ((ISupportInitialize)series1).EndInit();
            ((ISupportInitialize)chartControl1).EndInit();
            ((ISupportInitialize)hydroCurvePointViewModelBindingSource).EndInit();
            ResumeLayout(false);
        }
        #endregion
        private DevExpress.XtraCharts.ChartControl chartControl1;
        private BindingSource hydroCurvePointViewModelBindingSource;
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/06-curve/HydroCurveViewCtrl.cs
@@ -1,4 +1,6 @@
namespace Yw.WinFrmUI
using DevExpress.XtraCharts;
namespace Yw.WinFrmUI
{
    public partial class HydroCurveViewCtrl : DevExpress.XtraEditors.XtraUserControl
    {
@@ -6,5 +8,35 @@
        {
            InitializeComponent();
        }
        /// <summary>
        /// x
        /// </summary>
        public string TitleTextX
        {
            get { return ((XYDiagram)chartControl1.Diagram).AxisX.Title.Text; }
            set { ((XYDiagram)chartControl1.Diagram).AxisX.Title.Text = value; }
        }
        /// <summary>
        /// y
        /// </summary>
        public string TitleTextY
        {
            get { return ((XYDiagram)chartControl1.Diagram).AxisY.Title.Text; }
            set { ((XYDiagram)chartControl1.Diagram).AxisY.Title.Text = value; }
        }
        /// <summary>
        ///
        /// </summary>
        public void SetBindingData(List<HydroCurvePointViewModel> pts)
        {
            this.hydroCurvePointViewModelBindingSource.DataSource = pts;
            this.hydroCurvePointViewModelBindingSource.ResetBindings(false);
        }
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/06-curve/HydroCurveViewCtrl.resx
@@ -117,4 +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="hydroCurvePointViewModelBindingSource.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/03-property/06-curve/HydroCurveViewDlg.Designer.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,60 @@
namespace Yw.WinFrmUI
{
    partial class HydroCurveViewDlg
    {
        /// <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 Windows Form 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()
        {
            hydroCurveViewCtrl1 = new HydroCurveViewCtrl();
            SuspendLayout();
            //
            // hydroCurveViewCtrl1
            //
            hydroCurveViewCtrl1.Dock = DockStyle.Fill;
            hydroCurveViewCtrl1.Location = new Point(0, 0);
            hydroCurveViewCtrl1.Name = "hydroCurveViewCtrl1";
            hydroCurveViewCtrl1.Size = new Size(771, 567);
            hydroCurveViewCtrl1.TabIndex = 0;
            hydroCurveViewCtrl1.TitleTextX = "Axis of arguments";
            hydroCurveViewCtrl1.TitleTextY = "Axis of values";
            //
            // HydroCurveViewDlg
            //
            AutoScaleDimensions = new SizeF(7F, 14F);
            AutoScaleMode = AutoScaleMode.Font;
            ClientSize = new Size(771, 567);
            Controls.Add(hydroCurveViewCtrl1);
            Name = "HydroCurveViewDlg";
            StartPosition = FormStartPosition.CenterParent;
            Text = "曲线";
            ResumeLayout(false);
        }
        #endregion
        private HydroCurveViewCtrl hydroCurveViewCtrl1;
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/06-curve/HydroCurveViewDlg.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,38 @@
namespace Yw.WinFrmUI
{
    public partial class HydroCurveViewDlg : DevExpress.XtraEditors.XtraForm
    {
        public HydroCurveViewDlg()
        {
            InitializeComponent();
        }
        /// <summary>
        /// x
        /// </summary>
        public string TitleTextX
        {
            get { return this.hydroCurveViewCtrl1.TitleTextX; }
            set { this.hydroCurveViewCtrl1.TitleTextX = value; }
        }
        /// <summary>
        /// y
        /// </summary>
        public string TitleTextY
        {
            get { return this.hydroCurveViewCtrl1.TitleTextY; }
            set { this.hydroCurveViewCtrl1.TitleTextY = value; }
        }
        /// <summary>
        ///
        /// </summary>
        public void SetBindingData(List<HydroCurvePointViewModel> pts)
        {
            this.hydroCurveViewCtrl1.SetBindingData(pts);
        }
    }
}
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/06-curve/HydroCurveViewDlg.resx
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
  <!--
    Microsoft ResX Schema
    Version 2.0
    The primary goals of this format is to allow a simple XML format
    that is mostly human readable. The generation and parsing of the
    various data types are done through the TypeConverter classes
    associated with the data types.
    Example:
    ... ado.net/XML headers & schema ...
    <resheader name="resmimetype">text/microsoft-resx</resheader>
    <resheader name="version">2.0</resheader>
    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
        <value>[base64 mime encoded serialized .NET Framework object]</value>
    </data>
    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
        <comment>This is a comment</comment>
    </data>
    There are any number of "resheader" rows that contain simple
    name/value pairs.
    Each data row contains a name, and value. The row also contains a
    type or mimetype. Type corresponds to a .NET class that support
    text/value conversion through the TypeConverter architecture.
    Classes that don't support this are serialized and stored with the
    mimetype set.
    The mimetype is used for serialized objects, and tells the
    ResXResourceReader how to depersist the object. This is currently not
    extensible. For a given mimetype the value must be set accordingly:
    Note - application/x-microsoft.net.object.binary.base64 is the format
    that the ResXResourceWriter will generate, however the reader can
    read any of the formats listed below.
    mimetype: application/x-microsoft.net.object.binary.base64
    value   : The object must be serialized with
            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
            : and then encoded with base64 encoding.
    mimetype: application/x-microsoft.net.object.soap.base64
    value   : The object must be serialized with
            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
            : and then encoded with base64 encoding.
    mimetype: application/x-microsoft.net.object.bytearray.base64
    value   : The object must be serialized into a byte array
            : using a System.ComponentModel.TypeConverter
            : and then encoded with base64 encoding.
    -->
  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
    <xsd:element name="root" msdata:IsDataSet="true">
      <xsd:complexType>
        <xsd:choice maxOccurs="unbounded">
          <xsd:element name="metadata">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" />
              </xsd:sequence>
              <xsd:attribute name="name" use="required" type="xsd:string" />
              <xsd:attribute name="type" type="xsd:string" />
              <xsd:attribute name="mimetype" type="xsd:string" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="assembly">
            <xsd:complexType>
              <xsd:attribute name="alias" type="xsd:string" />
              <xsd:attribute name="name" type="xsd:string" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="data">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="resheader">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" />
            </xsd:complexType>
          </xsd:element>
        </xsd:choice>
      </xsd:complexType>
    </xsd:element>
  </xsd:schema>
  <resheader name="resmimetype">
    <value>text/microsoft-resx</value>
  </resheader>
  <resheader name="version">
    <value>2.0</value>
  </resheader>
  <resheader name="reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
</root>
WinFrmUI/Yw.WinFrmUI.Hydro.Core/03-property/HydroParterPropertyCtrl.cs
@@ -6,6 +6,8 @@
using DevExpress.XtraEditors.Repository;
using DevExpress.XtraLayout.Utils;
using DevExpress.XtraVerticalGrid.Events;
using NetTaste;
using System.Windows.Forms.VisualStyles;
namespace Yw.WinFrmUI
{
@@ -20,24 +22,25 @@
        }
        /// <summary>
        /// èŽ·å–æ°´åŠ›ä¿¡æ¯äº‹ä»¶
        /// </summary>
        public event Func<Yw.Model.HydroModelInfo> GetHydroInfoEvent;
        /// <summary>
        /// é€‰æ‹©æ›²çº¿äº‹ä»¶
        /// </summary>
        public event Action<HydroParterPropertyViewModel, string> SelectCurveEvent;
        public event Func<HydroParterPropertyViewModel, string, bool> SelectCurveEvent;
        /// <summary>
        /// é€‰æ‹©æ¨¡å¼äº‹ä»¶
        /// </summary>
        public event Action<HydroParterPropertyViewModel, string> SelectPatternEvent;
        public event Func<HydroParterPropertyViewModel, string, bool> SelectPatternEvent;
        /// <summary>
        /// å±žæ€§å€¼æ­£åœ¨æ”¹å˜äº‹ä»¶
        /// </summary>
        public event Action<HydroParterPropertyViewModel> PropertyValueChangingEvent;
        public event Func<HydroParterPropertyViewModel, bool> PropertyValueChangingEvent;
        /// <summary>
        /// å±žæ€§å€¼å‘生改变事件
        /// </summary>
        public event Action<HydroParterPropertyViewModel> PropertyValueChangedEvent;
        public event Func<HydroParterPropertyViewModel, bool> PropertyValueChangedEvent;
        /// <summary>
        /// ç»‘定对象
@@ -55,17 +58,24 @@
            }
        }
        /// <summary>
        /// ç»‘定对象列表
        /// </summary>
        public List<HydroParterPropertyViewModel> SelectedObjects
        {
            get { return this.propertyGridControl1.SelectedObjects?.Select(x => x as HydroParterPropertyViewModel).ToList(); }
            set
            {
                this.propertyGridControl1.SelectedObjects = value?.ToArray();
                OnChanged();
            }
        }
        //改变触发
        protected virtual void OnChanged()
        {
            if (this.SelectedObject == null)
            {
            }
            else
            {
            }
        }
        /// <summary>
@@ -248,7 +258,56 @@
                buttonEdit.ButtonClick += delegate
                {
                    var vm = GetPropertyViewModel(e.Row);
                    this.SelectCurveEvent?.Invoke(vm, curvePro.CurveType);
                    if (this.SelectCurveEvent == null || !this.SelectCurveEvent.Invoke(vm, curvePro.CurveType))
                    {
                        var hydroInfo = GetHydroInfoEvent?.Invoke();
                        if (hydroInfo == null)
                        {
                            return;
                        }
                        switch (curvePro.CurveType)
                        {
                            case HydroCurve.Pump:
                                {
                                }
                                break;
                            case HydroCurve.PumpQH:
                                {
                                    var vmPump = vm as HydroPumpPropertyViewModel;
                                    var curveQh = hydroInfo.Curves?.Find(x => x.Code == vmPump.CurveQH);
                                    var curvePts = curveQh?.CurveData?.Select(x => new HydroCurvePointViewModel(x.X, x.Y)).ToList();
                                    var dlg = new HydroCurveViewDlg();
                                    dlg.Text = $"{vm.Name}-流量扬程曲线";
                                    dlg.TitleTextX = "流量(m³/h)";
                                    dlg.TitleTextY = "扬程(m)";
                                    dlg.SetBindingData(curvePts);
                                    dlg.ShowDialog();
                                }
                                break;
                            case HydroCurve.PumpQP:
                                {
                                }
                                break;
                            case HydroCurve.PumpQE:
                                {
                                }
                                break;
                            case HydroCurve.Valve:
                                {
                                }
                                break;
                            case HydroCurve.ValveQL:
                                {
                                }
                                break;
                            default: break;
                        }
                    }
                };
                e.RepositoryItem = buttonEdit;
            }
@@ -291,6 +350,21 @@
            var descriptor = this.propertyGridControl1.GetPropertyDescriptor(e.Row);
            var propertyViewModel = GetPropertyViewModel(e.Row);
            this.PropertyValueChangedEvent?.Invoke(propertyViewModel);
            if (this.PropertyValueChangedEvent == null || !this.PropertyValueChangedEvent.Invoke(propertyViewModel))
            {
                var hydroInfo = GetHydroInfoEvent?.Invoke();
                if (hydroInfo == null)
                {
                    return;
                }
                var allParterList = hydroInfo.GetAllParters();
                var parter = allParterList?.Find(x => x.ID == propertyViewModel.ID);
                if (parter == null)
                {
                    return;
                }
                parter.UpdateProperty(allParterList, propertyViewModel);
            }
            UpdateRows();
        }
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Properties/DataSources/Yw.WinFrmUI.HydroCurvePointViewModel.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="HydroCurvePointViewModel" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
  <TypeInfo>Yw.WinFrmUI.HydroCurvePointViewModel, Yw.WinFrmUI.Hydro.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo>
</GenericObjectDataSource>
WinFrmUI/Yw.WinFrmUI.Hydro.Core/Yw.WinFrmUI.Hydro.Core.csproj.user
@@ -7,6 +7,9 @@
    <Compile Update="03-property\06-curve\HydroCurveViewCtrl.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Update="03-property\06-curve\HydroCurveViewDlg.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Update="04-parter\00-core\HydroParterListCtrl.cs">
      <SubType>UserControl</SubType>
    </Compile>