duheng
2025-02-07 80ef0be2e44f42d6f7dc0f9c928de0dbe7362138
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/XhsProjectSimulationMgrPage.cs
@@ -20,6 +20,7 @@
            this.simulationFunctionMgrCtrl1.ProjectSiteWorkingUpdateEvent += SimulationFunctionMgrCtrl1_ProjectSiteWorkingUpdateEvent;
            this.simulationFunctionMgrCtrl1.ProjectSiteWorkingRemoveEvent += SimulationFunctionMgrCtrl1_ProjectSiteWorkingRemoveEvent;
            this.simulationFunctionMgrCtrl1.ProjectSiteWorkingCheckedEvent += SimulationFunctionMgrCtrl1_ProjectSiteWorkingCheckedEvent;
            this.simulationFunctionMgrCtrl1.ProjectSiteWorkingReloadEvent += SimulationFunctionMgrCtrl1_ProjectSiteWorkingReloadEvent;
            this.simulationFunctionMgrCtrl1.CreateProjectSiteSchemeEvent += SimulationFunctionMgrCtrl1_CreateProjectSiteSchemeEvent;
            this.simulationFunctionMgrCtrl1.ProjectSiteSchemeAppendEvent += SimulationFunctionMgrCtrl1_ProjectSiteSchemeAppendEvent;
            this.simulationFunctionMgrCtrl1.ProjectSiteSchemeUpdateEvent += SimulationFunctionMgrCtrl1_ProjectSiteSchemeUpdateEvent;
@@ -122,6 +123,21 @@
                    {
                        //增加工况事件
                        this.simulationFunctionMgrCtrl1.AppendWorking(scheme, working);
                    };
                    page.UpdateWorkingEvent += (working) =>
                    {
                        //更新工况事件
                        this.simulationFunctionMgrCtrl1.UpdateWorking(scheme, working);
                    };
                    page.RemoveWorkingEvent += (working) =>
                    {
                        //移除工况事件
                        this.simulationFunctionMgrCtrl1.RemoveWorking(scheme, working);
                    };
                    page.ReloadWorkingEvent += (dict) =>
                    {
                        //重载工况事件
                        this.simulationFunctionMgrCtrl1.ReloadWorking(scheme, dict);
                    };
                    page.RefreshModelEvent += () =>
                    {
@@ -246,6 +262,35 @@
            ctrl.UpdateWorkingCheckedList(working, hasChecked);
        }
        //项目站工况选择重载事件
        private void SimulationFunctionMgrCtrl1_ProjectSiteWorkingReloadEvent
            (
                XhsProjectVmo project,
                XhsProjectSiteVmo projectSite,
                XhsSchemeVmo scheme,
                Dictionary<HydroWorkingVmo, bool> dict
            )
        {
            var guid = new PageGuid()
            {
                Modular = this.PageGuid.Modular,
                MoudingType = eMoudingType.Tab,
                Function = SimulationFunctionHelper.Simulation,
                TagName = $"{project.ID}-{projectSite.ID}-{scheme?.ID}"
            };
            var page = FindPage(guid);
            if (page == null)
            {
                return;
            }
            var ctrl = page as XhsProjectSimulationCorePage;
            if (ctrl == null)
            {
                return;
            }
            ctrl.ReloadWorkingCheckedList(dict);
        }
        //项目站方案创建事件
        private void SimulationFunctionMgrCtrl1_CreateProjectSiteSchemeEvent
            (