From 1e387f457092df846ec04e2c6792b83244aae04e Mon Sep 17 00:00:00 2001
From: duheng <2784771470@qq.com>
Date: 星期六, 07 十二月 2024 12:09:23 +0800
Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0

---
 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/XhsProjectSimulationMgrPage.cs |   82 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 81 insertions(+), 1 deletions(-)

diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/XhsProjectSimulationMgrPage.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/XhsProjectSimulationMgrPage.cs
index 3ae706b..37f5caf 100644
--- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/XhsProjectSimulationMgrPage.cs
+++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/XhsProjectSimulationMgrPage.cs
@@ -24,11 +24,13 @@
             this.simulationFunctionMgrCtrl1.CreateProjectSiteSchemeEvent += XhsProjectSimulationFunctionMgrCtrl1_CreateProjectSiteSchemeEvent;
             this.simulationFunctionMgrCtrl1.ShowProjectSiteSchemeEvent += XhsProjectSimulationFunctionMgrCtrl1_ShowProjectSiteSchemeEvent;
             this.simulationFunctionMgrCtrl1.ShowProjectSiteSchemeWorkingEvent += XhsProjectSimulationFunctionMgrCtrl1_ShowProjectSiteSchemeWorkingEvent;
+            this.simulationFunctionMgrCtrl1.ProjectSiteSchemeWorkingCheckedEvent += SimulationFunctionMgrCtrl1_ProjectSiteSchemeWorkingCheckedEvent;
+            this.simulationFunctionMgrCtrl1.ProjectSiteSchemeWorkingUpdateEvent += SimulationFunctionMgrCtrl1_ProjectSiteSchemeWorkingUpdateEvent;
+            this.simulationFunctionMgrCtrl1.ProjectSiteSchemeWorkingRemoveEvent += SimulationFunctionMgrCtrl1_ProjectSiteSchemeWorkingRemoveEvent;
         }
 
         private XhsProjectVmo _project = null;//椤圭洰
         private object _locker = new object();//閿佸畾瀵硅薄
-
 
         /// <summary>
         /// 鍒濆鍖栨暟鎹簮
@@ -278,12 +280,90 @@
                 {
                     var page = new XhsProjectSimulationWorkingPage();
                     page.PageTitle.HeaderSvgImage = svgImage;
+                    page.UpdateWorkingEvent += (rhs) =>
+                    {
+                        this.simulationFunctionMgrCtrl1.UpdateSchemeWorking(scheme, rhs);
+                    };
+                    page.RemoveWorkingEvent += (rhs) =>
+                    {
+                        this.simulationFunctionMgrCtrl1.RemoveSchemeWorking(scheme, rhs);
+                    };
                     page.SetBindingData(project, projectSite, scheme, hydroInfo, working);
                     CreatePage(page, guid);
                 }
             }
         }
 
+        //椤圭洰绔欐柟妗堝伐鍐甸�夋嫨鏀瑰彉浜嬩欢
+        private void SimulationFunctionMgrCtrl1_ProjectSiteSchemeWorkingCheckedEvent(XhsSchemeVmo scheme, HydroWorkingVmo working, bool hasChecked)
+        {
+            var guid = new PageGuid()
+            {
+                Modular = this.PageGuid.Modular,
+                MoudingType = eMoudingType.Tab,
+                Function = SimulationFunctionHelper.Scheme,
+                TagName = scheme.ID.ToString()
+            };
+            var page = FindPage(guid);
+            if (page == null)
+            {
+                return;
+            }
+            var ctrl = page as XhsProjectSimulationSchemePage;
+            if (ctrl == null)
+            {
+                return;
+            }
+            ctrl.UpdateWorkingCheckedList(working, hasChecked);
+        }
+
+        //椤圭洰绔欐柟妗堝伐鍐垫洿鏂颁簨浠�
+        private void SimulationFunctionMgrCtrl1_ProjectSiteSchemeWorkingUpdateEvent(XhsSchemeVmo scheme, HydroWorkingVmo working)
+        {
+            var guid = new PageGuid()
+            {
+                Modular = this.PageGuid.Modular,
+                MoudingType = eMoudingType.Tab,
+                Function = SimulationFunctionHelper.Scheme,
+                TagName = scheme.ID.ToString()
+            };
+            var page = FindPage(guid);
+            if (page == null)
+            {
+                return;
+            }
+            var ctrl = page as XhsProjectSimulationSchemePage;
+            if (ctrl == null)
+            {
+                return;
+            }
+
+        }
+
+        //椤圭洰绔欐柟妗堝伐鍐电Щ闄や簨浠�
+        private void SimulationFunctionMgrCtrl1_ProjectSiteSchemeWorkingRemoveEvent(XhsSchemeVmo scheme, HydroWorkingVmo working)
+        {
+            var guid = new PageGuid()
+            {
+                Modular = this.PageGuid.Modular,
+                MoudingType = eMoudingType.Tab,
+                Function = SimulationFunctionHelper.Scheme,
+                TagName = scheme.ID.ToString()
+            };
+            var page = FindPage(guid);
+            if (page == null)
+            {
+                return;
+            }
+            var ctrl = page as XhsProjectSimulationSchemePage;
+            if (ctrl == null)
+            {
+                return;
+            }
+
+        }
+
+
         #endregion
 
         #region TabbedView 鐩稿叧浜嬩欢澶勭悊绋嬪簭

--
Gitblit v1.9.3