Shuxia Ning
2024-10-14 13764e3f5e8eb400b84c2c7b238d09f6089612f8
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/XhsProjectSimulationMgrPage.cs
@@ -14,7 +14,7 @@
            this.PageTitle.HeaderSvgImage = this.svgImg32[0];
            this.PageTitle.SvgImageSize = new Size(24, 24);
            this.xhsProjectSimulationSchemeMgrCtrl1.ProjectSiteSelectedChangedEvent += XhsProjectSimulationSchemeMgrCtrl1_ProjectSiteSelectedChangedEvent;
            this.xhsProjectSimulationFunctionMgrCtrl1.ProjectSiteSelectedChangedEvent += xhsProjectSimulationFunctionMgrCtrl1_ProjectSiteSelectedChangedEvent;
            this.xhsProjectSimulationFunctionMgrCtrl1.ShowXhsProjectInfoEvent += XhsProjectSimulationFunctionMgrCtrl1_ShowXhsProjectInfoEvent;
            this.xhsProjectSimulationFunctionMgrCtrl1.ShowXhsProjectSimulationEvent += XhsProjectSimulationFunctionMgrCtrl1_ShowXhsProjectSimulationEvent;
            this.xhsProjectSimulationFunctionMgrCtrl1.CreateXhsProjectSchemeEvent += XhsProjectSimulationFunctionMgrCtrl1_CreateXhsProjectSchemeEvent;
@@ -25,6 +25,14 @@
        private XhsProjectVmo _project = null;//项目
        private XhsProjectSiteVmo _projectSite = null;//项目站
        private Yw.Model.HydroModelInfo _hydroInfo = null;//水力信息
        /// <summary>
        /// 初始化数据源
        /// </summary>
        public override void InitialDataSource()
        {
            base.InitialDataSource();
        }
        /// <summary>
        /// 绑定数据
@@ -46,20 +54,14 @@
            }
            _project = project;
            _projectId = project.ID;
            this.PageTitle.Caption = $"{_project.Name}\r\n水力模拟";
            await this.xhsProjectSimulationSchemeMgrCtrl1.SetBindingData(_project);
            this.PageTitle.Caption = $"{_project.Name}\r\n项目模拟";
            await this.xhsProjectSimulationFunctionMgrCtrl1.SetBindingData(_project);
        }
        /// <summary>
        /// 初始化数据源
        /// </summary>
        public override void InitialDataSource()
        {
            base.InitialDataSource();
        }
        #region 功能面板
        //项目站选择改变事件
        private async void XhsProjectSimulationSchemeMgrCtrl1_ProjectSiteSelectedChangedEvent(XhsProjectSiteVmo obj)
        private async void xhsProjectSimulationFunctionMgrCtrl1_ProjectSiteSelectedChangedEvent(XhsProjectSiteVmo obj)
        {
            _projectSite = obj;
            if (_projectSite != null)
@@ -67,7 +69,7 @@
                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();
                this.xhsProjectSimulationFunctionMgrCtrl1.ResetBindingData();
            }
        }
@@ -117,7 +119,7 @@
            await dlg.SetBindingData(_projectSite.ID);
            dlg.ReloadDataEvent += (scheme) =>
            {
                this.xhsProjectSimulationSchemeMgrCtrl1.AppendScheme(scheme);
                this.xhsProjectSimulationFunctionMgrCtrl1.AppendScheme(scheme);
            };
            dlg.ShowDialog();
        }
@@ -125,9 +127,11 @@
        //比较项目方案事件
        private void XhsProjectSimulationFunctionMgrCtrl1_CompareXhsProjectSchemeEvent(DevExpress.Utils.Svg.SvgImage obj)
        {
            TipFormHelper.ShowWarn("正在开发中,敬请期待...");
        }
        #endregion
        #region TabbedView 相关事件处理程序
        //选中