From d672ca82c49f01dae2c5c955202b5857ef680a71 Mon Sep 17 00:00:00 2001
From: lixiaojun <1287241240@qq.com>
Date: 星期五, 03 一月 2025 22:16:48 +0800
Subject: [PATCH] 创建方案

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

diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/XhsProjectSimulationMgrPage.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/XhsProjectSimulationMgrPage.cs
index b2deb97..c403ae0 100644
--- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/XhsProjectSimulationMgrPage.cs
+++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/XhsProjectSimulationMgrPage.cs
@@ -17,7 +17,6 @@
             this.PageTitle.SvgImageSize = new Size(24, 24);
             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;
@@ -151,44 +150,6 @@
             }
         }
 
-        //鏄剧ず椤圭洰绔欏伐鍐典簨浠�
-        private void SimulationFunctionMgrCtrl1_ShowProjectSiteWorkingEvent
-            (
-                XhsProjectVmo project,
-                XhsProjectSiteVmo projectSite,
-                XhsSchemeVmo scheme,
-                Yw.Model.HydroModelInfo hydroInfo,
-                HydroWorkingVmo working,
-                SvgImage svgImage
-            )
-        {
-            lock (_locker)
-            {
-                var guid = new PageGuid()
-                {
-                    Modular = this.PageGuid.Modular,
-                    MoudingType = eMoudingType.Tab,
-                    Function = SimulationFunctionHelper.Working,
-                    TagName = $"{project.ID}-{projectSite.ID}-{scheme?.ID}-{working.ID}"
-                };
-                if (!IsExistPage(guid, true))
-                {
-                    var page = new XhsProjectSimulationWorkingPage();
-                    page.UpdateWorkingEvent += (rhs) =>
-                    {
-                        this.simulationFunctionMgrCtrl1.UpdateWorking(scheme, rhs);
-                    };
-                    page.RemoveWorkingEvent += (rhs) =>
-                    {
-                        this.simulationFunctionMgrCtrl1.RemoveWorking(scheme, rhs);
-                    };
-                    page.PageTitle.HeaderSvgImage = svgImage;
-                    page.SetBindingData(project, projectSite, scheme, hydroInfo, working);
-                    CreatePage(page, guid);
-                }
-            }
-        }
-
         /// <summary>
         /// 椤圭洰绔欏伐鍐靛鍔犱簨浠�
         /// </summary>
@@ -217,7 +178,7 @@
                 Modular = this.PageGuid.Modular,
                 MoudingType = eMoudingType.Tab,
                 Function = SimulationFunctionHelper.Simulation,
-                TagName = projectSite.ID.ToString()
+                TagName = $"{project.ID}-{projectSite.ID}-{scheme?.ID}"
             };
             var page = FindPage(guid);
             if (page == null)
@@ -297,22 +258,18 @@
                 XhsProjectVmo project,
                 XhsProjectSiteVmo projectSite,
                 Yw.Model.HydroModelInfo hydroInfo,
+                List<XhsSchemeVmo> allSchemeList,
                 SvgImage svgImage
             )
         {
-            //WaitFormHelper.ShowWaitForm(this.FindForm(), "姝e湪鍔犺浇妯″瀷锛岃绋嶄警...");
-            //var dlg = new AddXhsSchemeDlg();
-            //dlg.Shown += delegate { WaitFormHelper.HideWaitForm(this.FindForm()); };
-            //dlg.ReloadDataEvent += (rhs) =>
-            //{
-            //    this.simulationFunctionMgrCtrl1.AppendScheme(rhs);
-            //};
-            //dlg.SetBindingData(project, projectSite, hydroInfo);
-            //dlg.ShowDialog();
-
+            WaitFormHelper.ShowWaitForm(this.FindForm(), "姝e湪鍔犺浇锛岃绋嶄警...");
             var dlg = new CreateXhsSchemeDlg();
             dlg.Shown += delegate { WaitFormHelper.HideWaitForm(this.FindForm()); };
-            dlg.SetBindingData(project, projectSite, hydroInfo);
+            dlg.SetBindingData(project, projectSite, hydroInfo, allSchemeList);
+            dlg.ReloadDataEvent += (rhs) =>
+            {
+                this.simulationFunctionMgrCtrl1.AppendScheme(rhs);
+            };
             dlg.ShowDialog();
         }
 

--
Gitblit v1.9.3