Shuxia Ning
2024-12-11 f2cc8078a00824a319dab44841f7cb64fdee76b0
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/XhsProjectSimulationMgrPage.cs
@@ -18,14 +18,18 @@
            this.simulationFunctionMgrCtrl1.ShowProjectSiteInfoEvent += SimulationFunctionMgrCtrl1_ShowProjectSiteInfoEvent;
            this.simulationFunctionMgrCtrl1.ShowProjectSiteSimulationEvent += SimulationFunctionMgrCtrl1_ShowProjectSiteSimulationEvent;
            this.simulationFunctionMgrCtrl1.ShowProjectSiteWorkingEvent += SimulationFunctionMgrCtrl1_ShowProjectSiteWorkingEvent;
            this.simulationFunctionMgrCtrl1.ProjectSiteWorkingAppendEvent += SimulationFunctionMgrCtrl1_ProjectSiteWorkingAppendEvent;
            this.simulationFunctionMgrCtrl1.ProjectSiteWorkingUpdateEvent += SimulationFunctionMgrCtrl1_ProjectSiteWorkingUpdateEvent;
            this.simulationFunctionMgrCtrl1.ProjectSiteWorkingRemoveEvent += SimulationFunctionMgrCtrl1_ProjectSiteWorkingRemoveEvent;
            this.simulationFunctionMgrCtrl1.ProjectSiteWorkingCheckedEvent += SimulationFunctionMgrCtrl1_ProjectSiteWorkingCheckedEvent;
            this.simulationFunctionMgrCtrl1.CreateProjectSiteSchemeEvent += SimulationFunctionMgrCtrl1_CreateProjectSiteSchemeEvent;
            this.simulationFunctionMgrCtrl1.ProjectSiteSchemeAppendEvent += SimulationFunctionMgrCtrl1_ProjectSiteSchemeAppendEvent;
            this.simulationFunctionMgrCtrl1.ProjectSiteSchemeUpdateEvent += SimulationFunctionMgrCtrl1_ProjectSiteSchemeUpdateEvent;
            this.simulationFunctionMgrCtrl1.ProjectSiteSchemeRemoveEvent += SimulationFunctionMgrCtrl1_ProjectSiteSchemeRemoveEvent;
        }
        private XhsProjectVmo _project = null;//项目
        private object _locker = new object();//锁定对象
        private object _locker = new();//锁定对象
        /// <summary>
        /// 初始化数据源
@@ -118,7 +122,28 @@
                    page.PageTitle.HeaderSvgImage = svgImage;
                    page.AppendWorkingEvent += (working) =>
                    {
                        //增加工况事件
                        this.simulationFunctionMgrCtrl1.AppendWorking(scheme, working);
                    };
                    page.SaveModelEvent += (rhs) =>
                    {
                        //保存模型事件
                        return this.simulationFunctionMgrCtrl1.SaveModel(scheme, rhs);
                    };
                    page.RefreshModelEvent += () =>
                    {
                        //刷新模型事件
                        return this.simulationFunctionMgrCtrl1.RefreshModel(scheme);
                    };
                    page.UpdateSchemeEvent += (rhs) =>
                    {
                        //更新方案事件
                        this.simulationFunctionMgrCtrl1.UpdateScheme(rhs);
                    };
                    page.RemoveSchemeEvent += (rhs) =>
                    {
                        //移除方案事件
                        this.simulationFunctionMgrCtrl1.RemoveScheme(rhs);
                    };
                    page.SetBindingData(project, projectSite, scheme, hydroInfo, allWorkingCheckedListDict);
                    CreatePage(page, guid);
@@ -162,6 +187,20 @@
                    CreatePage(page, guid);
                }
            }
        }
        /// <summary>
        /// 项目站工况增加事件
        /// </summary>
        private void SimulationFunctionMgrCtrl1_ProjectSiteWorkingAppendEvent
            (
                XhsProjectVmo project,
                XhsProjectSiteVmo projectSite,
                XhsSchemeVmo scheme,
                HydroWorkingVmo working
            )
        {
            //目前增加工况都是通过模拟界面增加的,功能管理控件属于被通知的,其他地方暂时不关心工况增加
        }
        //项目站工况更新事件
@@ -272,6 +311,39 @@
            dlg.ShowDialog();
        }
        //项目站方案增加事件
        private void SimulationFunctionMgrCtrl1_ProjectSiteSchemeAppendEvent
            (
                XhsProjectVmo project,
                XhsProjectSiteVmo projectSite,
                XhsSchemeVmo scheme
            )
        {
            //被动
        }
        //项目站方案更新事件
        private void SimulationFunctionMgrCtrl1_ProjectSiteSchemeUpdateEvent
            (
                XhsProjectVmo project,
                XhsProjectSiteVmo projectSite,
                XhsSchemeVmo scheme
            )
        {
            //被动
        }
        //项目站方案移除事件
        private void SimulationFunctionMgrCtrl1_ProjectSiteSchemeRemoveEvent
            (
                XhsProjectVmo project,
                XhsProjectSiteVmo projectSite,
                XhsSchemeVmo scheme
            )
        {
            //被动
        }
        #endregion
        #region TabbedView 相关事件处理程序