Shuxia Ning
2024-11-25 d4898c5d7e1bbbbba384a0e29f29c066d6f502a7
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/XhsProjectSimulationMgrPage.cs
@@ -13,15 +13,14 @@
            this.PageTitle.HeaderSvgImage = this.svgImg32[0];
            this.PageTitle.SvgImageSize = new Size(24, 24);
            this.xhsProjectSimulationFunctionMgrCtrl1.ProjectSiteSelectedChangedEvent += xhsProjectSimulationFunctionMgrCtrl1_ProjectSiteSelectedChangedEvent;
            this.xhsProjectSimulationFunctionMgrCtrl1.ShowXhsProjectInfoEvent += XhsProjectSimulationFunctionMgrCtrl1_ShowXhsProjectInfoEvent;
            this.xhsProjectSimulationFunctionMgrCtrl1.ShowXhsProjectSimulationEvent += XhsProjectSimulationFunctionMgrCtrl1_ShowXhsProjectSimulationEvent;
            this.xhsProjectSimulationFunctionMgrCtrl1.CreateXhsProjectSchemeEvent += XhsProjectSimulationFunctionMgrCtrl1_CreateXhsProjectSchemeEvent;
            this.xhsProjectSimulationFunctionMgrCtrl1.CompareXhsProjectSchemeEvent += XhsProjectSimulationFunctionMgrCtrl1_CompareXhsProjectSchemeEvent;
            //this.xhsProjectSimulationFunctionMgrCtrl1.ProjectSiteSelectedChangedEvent += xhsProjectSimulationFunctionMgrCtrl1_ProjectSiteSelectedChangedEvent;
            this.xhsProjectSimulationFunctionMgrCtrl1.ShowProjectInfoEvent += XhsProjectSimulationFunctionMgrCtrl1_ShowProjectInfoEvent;
            this.xhsProjectSimulationFunctionMgrCtrl1.ShowProjectSimulationEvent += XhsProjectSimulationFunctionMgrCtrl1_ShowProjectSimulationEvent;
            // this.xhsProjectSimulationFunctionMgrCtrl1.CreateXhsProjectSchemeEvent += XhsProjectSimulationFunctionMgrCtrl1_CreateXhsProjectSchemeEvent;
            //this.xhsProjectSimulationFunctionMgrCtrl1.CompareXhsProjectSchemeEvent += XhsProjectSimulationFunctionMgrCtrl1_CompareXhsProjectSchemeEvent;
            PumpFullInfoViewDlg.JumpPumpFullInfoCtrl += ShowPumpInfo;
        }
        private long _projectId;//项目id
        private XhsProjectVmo _project = null;//项目
        private XhsProjectSiteVmo _projectSite = null;//项目站
        private Yw.Model.HydroModelInfo _hydroInfo = null;//水力信息
@@ -53,9 +52,17 @@
                return;
            }
            _project = project;
            _projectId = project.ID;
            this.PageTitle.Caption = $"{_project.Name}\r\n项目模拟";
            await this.xhsProjectSimulationFunctionMgrCtrl1.SetBindingData(_project);
            _projectSite = await BLLFactory<HStation.BLL.XhsProjectSite>.Instance.GetDefaultByProjectID(_project.ID);
            var hydroRelation = await BLLFactory<Yw.BLL.HydroModelRelation>.Instance
                  .GetDefaultByObjectTypeAndObjectIDOfPurpose(HStation.Xhs.DataType.XhsProjectSite, _projectSite.ID, HStation.Xhs.Purpose.Simulation);
            _hydroInfo = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance.GetByID(hydroRelation.ModelID);
            this.xhsProjectSimulationFunctionMgrCtrl1.SetBindingData(_project, _projectSite);
            //this.xhsProjectSimulationFunctionTreeCtrl1.SetBindingData(list);
            // await this.xhsProjectSimulationFunctionMgrCtrl1.SetBindingData(_project);
        }
        #region 功能面板
@@ -69,12 +76,13 @@
                var hydroRelation = await BLLFactory<Yw.BLL.HydroModelRelation>.Instance
                   .GetDefaultByObjectTypeAndObjectIDOfPurpose(HStation.Xhs.DataType.XhsProjectSite, _projectSite.ID, HStation.Xhs.Purpose.Simulation);
                _hydroInfo = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance.GetByID(hydroRelation.ModelID);
                this.xhsProjectSimulationFunctionMgrCtrl1.ResetBindingData();
                //this.xhsProjectSimulationFunctionMgrCtrl1.ResetBindingData();
            }
        }
        //显示项目信息事件
        private async void XhsProjectSimulationFunctionMgrCtrl1_ShowXhsProjectInfoEvent(DevExpress.Utils.Svg.SvgImage obj)
        private async void XhsProjectSimulationFunctionMgrCtrl1_ShowProjectInfoEvent(DevExpress.Utils.Svg.SvgImage obj)
        {
            var guid = new PageGuid()
            {
@@ -91,7 +99,7 @@
        }
        //显示水力模拟事件
        private async void XhsProjectSimulationFunctionMgrCtrl1_ShowXhsProjectSimulationEvent(DevExpress.Utils.Svg.SvgImage obj)
        private async void XhsProjectSimulationFunctionMgrCtrl1_ShowProjectSimulationEvent(DevExpress.Utils.Svg.SvgImage obj)
        {
            var guid = new PageGuid()
            {