lixiaojun
2024-09-20 39d2183cdaf8ce1ee77e36fed5a447b2d8d897a1
增加input
已修改2个文件
90 ■■■■■ 文件已修改
WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.Designer.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.cs 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.Designer.cs
@@ -254,14 +254,14 @@
            pageBimface.Caption = "三维模型";
            pageBimface.Controls.Add(xhsProjectSimulationBimfaceCtrl1);
            pageBimface.Name = "pageBimface";
            pageBimface.Size = new Size(886, 202);
            pageBimface.Size = new Size(886, 175);
            // 
            // xhsProjectSimulationBimfaceCtrl1
            // 
            xhsProjectSimulationBimfaceCtrl1.Dock = DockStyle.Fill;
            xhsProjectSimulationBimfaceCtrl1.Location = new Point(0, 0);
            xhsProjectSimulationBimfaceCtrl1.Name = "xhsProjectSimulationBimfaceCtrl1";
            xhsProjectSimulationBimfaceCtrl1.Size = new Size(886, 202);
            xhsProjectSimulationBimfaceCtrl1.Size = new Size(886, 175);
            xhsProjectSimulationBimfaceCtrl1.TabIndex = 0;
            xhsProjectSimulationBimfaceCtrl1.ClickParterEvent += xhsProjectSimulationBimfaceCtrl1_ClickParterEvent;
            // 
@@ -320,7 +320,7 @@
            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.Location = new Point(0, 572);
            docPnlHydroParterList.Name = "docPnlHydroParterList";
            docPnlHydroParterList.OriginalSize = new Size(200, 291);
            docPnlHydroParterList.Size = new Size(886, 291);
@@ -350,7 +350,7 @@
            docPnlHydroCalcu.Dock = DevExpress.XtraBars.Docking.DockingStyle.Bottom;
            docPnlHydroCalcu.FloatVertical = true;
            docPnlHydroCalcu.ID = new Guid("ac7055c0-e9fe-40c2-bf51-83dde5710cd4");
            docPnlHydroCalcu.Location = new Point(0, 561);
            docPnlHydroCalcu.Location = new Point(0, 336);
            docPnlHydroCalcu.Name = "docPnlHydroCalcu";
            docPnlHydroCalcu.OriginalSize = new Size(200, 236);
            docPnlHydroCalcu.Size = new Size(886, 236);
@@ -414,9 +414,9 @@
            AutoScaleDimensions = new SizeF(7F, 14F);
            AutoScaleMode = AutoScaleMode.Font;
            Controls.Add(tabPane1);
            Controls.Add(docPnlProperty);
            Controls.Add(docPnlHydroCalcu);
            Controls.Add(docPnlHydroParterList);
            Controls.Add(docPnlProperty);
            Controls.Add(docPnlHydroCheck);
            Controls.Add(ribbonControl1);
            Margin = new Padding(2);
WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.cs
@@ -261,7 +261,87 @@
        //自动匹配
        private void barBtnAllAutoMatching_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (_hydroInfo == null)
            {
                return;
            }
            var input = new AssetsAutoMatchingInputViewModel();
            input.PumpMatchingModels = _hydroInfo.Pumps?.Select(x => new PumpMatchingViewModel()
            {
                ID = x.ID,
                Code = x.Code,
                Name = x.Name,
                DbID = x.DbId,
                DbLocked = x.DbLocked,
                //ChartDbID=_hydroInfo.Curves?.Find(t=>t.Code==x.CurveQH)?.DbId,这里不是long CurveDbId
                ModelType = x.ModelType,
                RatedP = x.RatedP,
                RatedH = x.RatedH,
                RatedN = x.RatedN,
                RatedQ = x.RatedQ,
            }).ToList();
            input.ElbowsMatchingModels = _hydroInfo.Elbows?.Select(x => new ElbowsMatchingViewModel()
            {
                ID = x.ID,
                Name = x.Name,
                Code = x.Code,
                // Dbid=x.DbId,这里是string DbId
                DbLocked = x.DbLocked,
                ModelType = x.ModelType,
                Caliber = x.Caliber,
                Material = x.Material
            }).ToList();
            input.ThreeLinkMatchingModels = _hydroInfo.Threelinks?.Select(x => new ThreeLinkMatchingViewModel()
            {
                ID = x.ID,
                Name = x.Name,
                Code = x.Code,
                // Dbid=x.DbId,这里是string DbId
                DbLocked = x.DbLocked,
                ModelType = x.ModelType,
                Caliber = x.Caliber,
                Material = x.Material
            }).ToList();
            input.FourLinkMatchingModels = _hydroInfo.Fourlinks?.Select(x => new FourLinkMatchingViewModel()
            {
                ID = x.ID,
                Name = x.Name,
                Code = x.Code,
                // Dbid=x.DbId,这里是string DbId
                DbLocked = x.DbLocked,
                ModelType = x.ModelType,
                Caliber = x.Caliber,
                Material = x.Material
            }).ToList();
            //构造函数有问题
            //input.PipeLineMatchingModels = _hydroInfo.Pipes?.Select(x => new PipeLineMatchingViewModel()
            //{
            //    ID = x.ID,
            //    Name = x.Name,
            //    Code = x.Code,
            //    // Dbid=x.DbId,这里是string DbId
            //    DbLocked = x.DbLocked,
            //    ModelType = x.ModelType,
            //    Caliber = x.Diameter.ToString(),//这里是数值
            //    Material = x.Material
            //}).ToList();
            input.ValveMatchingModels = _hydroInfo.Pipes?.Select(x => new ValveMatchingViewModel()
            {
                ID = x.ID,
                Name = x.Name,
                Code = x.Code,
                // Dbid=x.DbId,这里是string DbId
                DbLocked = x.DbLocked,
                ModelType = x.ModelType,
                Caliber = x.Diameter.ToString(),//这里是数值
                Material = x.Material//怎么没有阀门类型
            }).ToList();
            //既然入参和出参已经保持一致了,就不能叫做InputViewModel了,有歧义
            //这里可以先是窗体,调试好,后面改成控件
            var dlg = new AssetsAutoMatchingMainDlg();
            dlg.SetBindingData(input);
            // dlg.SetBindingData();
            dlg.RelaodEvent += (rhs) =>
            {