From b26ae60e85d4a03a2426e6607e7afe89e1c10a5f Mon Sep 17 00:00:00 2001
From: duheng <2784771470@qq.com>
Date: 星期四, 05 十二月 2024 11:50:35 +0800
Subject: [PATCH] 水池单独匹配界面修改

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

diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/XhsProjectSimulationMgrPage.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/XhsProjectSimulationMgrPage.cs
index 93e9243..314c1ab 100644
--- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/XhsProjectSimulationMgrPage.cs
+++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/XhsProjectSimulationMgrPage.cs
@@ -1,4 +1,6 @@
-锘縰sing DevExpress.XtraBars.Docking;
+锘縰sing DevExpress.Drawing;
+using DevExpress.Utils.Svg;
+using DevExpress.XtraBars.Docking;
 using DevExpress.XtraBars.Docking2010.Views;
 using Yw.Vmo;
 using Yw.WinFrmUI.Page;
@@ -17,6 +19,9 @@
             this.xhsProjectSimulationFunctionMgrCtrl1.ShowProjectSiteSimulationEvent += XhsProjectSimulationFunctionMgrCtrl1_ShowProjectSiteSimulationEvent;
             this.xhsProjectSimulationFunctionMgrCtrl1.ShowProjectSiteWorkingEvent += XhsProjectSimulationFunctionMgrCtrl1_ShowProjectSiteWorkingEvent;
             this.xhsProjectSimulationFunctionMgrCtrl1.ProjectSiteWorkingCheckedEvent += XhsProjectSimulationFunctionMgrCtrl1_ProjectSiteWorkingCheckedEvent;
+            this.xhsProjectSimulationFunctionMgrCtrl1.CreateProjectSiteSchemeEvent += XhsProjectSimulationFunctionMgrCtrl1_CreateProjectSiteSchemeEvent;
+            this.xhsProjectSimulationFunctionMgrCtrl1.ShowProjectSiteSchemeEvent += XhsProjectSimulationFunctionMgrCtrl1_ShowProjectSiteSchemeEvent;
+            this.xhsProjectSimulationFunctionMgrCtrl1.ShowProjectSiteSchemeWorkingEvent += XhsProjectSimulationFunctionMgrCtrl1_ShowProjectSiteSchemeWorkingEvent;
         }
 
         private XhsProjectVmo _project = null;//椤圭洰
@@ -62,7 +67,7 @@
 
         //鏄剧ず椤圭洰绔欐鍐典簨浠�
         private void XhsProjectSimulationFunctionMgrCtrl1_ShowProjectSiteInfoEvent
-            (XhsProjectVmo project, XhsProjectSiteVmo projectSite, Yw.Model.HydroModelInfo hydroInfo, DevExpress.Utils.Svg.SvgImage svgImage)
+            (XhsProjectVmo project, XhsProjectSiteVmo projectSite, Yw.Model.HydroModelInfo hydroInfo, SvgImage svgImage)
         {
             lock (_locker)
             {
@@ -84,7 +89,7 @@
 
         //鏄剧ず椤圭洰绔欐按鍔涙ā鎷熶簨浠�
         private void XhsProjectSimulationFunctionMgrCtrl1_ShowProjectSiteSimulationEvent
-            (XhsProjectVmo project, XhsProjectSiteVmo projectSite, Yw.Model.HydroModelInfo hydroInfo, Dictionary<HydroWorkingVmo, bool> allWorkingCheckedListDict, DevExpress.Utils.Svg.SvgImage svgImage)
+            (XhsProjectVmo project, XhsProjectSiteVmo projectSite, Yw.Model.HydroModelInfo hydroInfo, Dictionary<HydroWorkingVmo, bool> allWorkingCheckedListDict, SvgImage svgImage)
         {
             lock (_locker)
             {
@@ -111,7 +116,7 @@
 
         //鏄剧ず椤圭洰绔欏伐鍐典簨浠�
         private void XhsProjectSimulationFunctionMgrCtrl1_ShowProjectSiteWorkingEvent
-            (XhsProjectVmo project, XhsProjectSiteVmo projectSite, Yw.Model.HydroModelInfo hydroInfo, HydroWorkingVmo working, DevExpress.Utils.Svg.SvgImage svgImage)
+            (XhsProjectVmo project, XhsProjectSiteVmo projectSite, Yw.Model.HydroModelInfo hydroInfo, HydroWorkingVmo working, SvgImage svgImage)
         {
             lock (_locker)
             {
@@ -156,44 +161,69 @@
             ctrl.UpdateWorkingCheckedList(working, hasChecked);
         }
 
-
-
-        //鍒涘缓椤圭洰鏂规浜嬩欢
-        private void XhsProjectSimulationFunctionMgrCtrl1_CreateProjectSchemeEvent(DevExpress.Utils.Svg.SvgImage svgImage)
+        //椤圭洰绔欐柟妗堝垱寤轰簨浠�
+        private void XhsProjectSimulationFunctionMgrCtrl1_CreateProjectSiteSchemeEvent
+            (XhsProjectVmo project, XhsProjectSiteVmo projectSite, Yw.Model.HydroModelInfo hydroInfo, SvgImage svgImage)
         {
-            //if (_projectSite == null)
-            //{
-            //    return;
-            //}
-            //var dlg = new AddXhsProjectSimulationSchemeDlg();
-            //await dlg.SetBindingData(_projectSite.ID);
-            //dlg.ReloadDataEvent += (scheme) =>
-            //{
-            //    this.xhsProjectSimulationFunctionMgrCtrl1.AppendScheme(scheme);
-            //};
-            //dlg.ShowDialog();
-
+            WaitFormHelper.ShowWaitForm(this.FindForm(), "姝e湪鍔犺浇妯″瀷锛岃绋嶄警...");
             var dlg = new AddXhsSchemeDlg();
-            // await dlg.SetBindingData(_project, _projectSite, _hydroInfo);
+            dlg.Shown += delegate { WaitFormHelper.HideWaitForm(this.FindForm()); };
+            dlg.ReloadDataEvent += (rhs) =>
+            {
+                this.xhsProjectSimulationFunctionMgrCtrl1.AppendScheme(rhs);
+            };
+            dlg.SetBindingData(project, projectSite, hydroInfo);
             dlg.ShowDialog();
         }
 
-        //鏄剧ず椤圭洰鏂规浜嬩欢
-        private void XhsProjectSimulationFunctionMgrCtrl1_ShowProjectSchemeEvent(XhsSchemeVmo arg1, DevExpress.Utils.Svg.SvgImage arg2)
+        //鏄剧ず椤圭洰绔欐柟妗堜簨浠�
+        private void XhsProjectSimulationFunctionMgrCtrl1_ShowProjectSiteSchemeEvent
+            (XhsProjectVmo project, XhsProjectSiteVmo projectSite, XhsSchemeVmo scheme, Yw.Model.HydroModelInfo hydroInfo, Dictionary<HydroWorkingVmo, bool> dict, SvgImage svgImage)
         {
-
+            lock (_locker)
+            {
+                var guid = new PageGuid()
+                {
+                    Modular = this.PageGuid.Modular,
+                    MoudingType = eMoudingType.Tab,
+                    Function = SimulationFunctionHelper.Scheme,
+                    TagName = scheme.ID.ToString()
+                };
+                if (!IsExistPage(guid, true))
+                {
+                    var page = new XhsProjectSimulationSchemePage();
+                    page.PageTitle.HeaderSvgImage = svgImage;
+                    page.AppendWorkingEvent += (working) =>
+                    {
+                        this.xhsProjectSimulationFunctionMgrCtrl1.AppendSchemeWorking(scheme, working);
+                    };
+                    page.SetBindingData(project, projectSite, scheme, hydroInfo, dict);
+                    CreatePage(page, guid);
+                }
+            }
         }
 
-        //姣旇緝椤圭洰宸ュ喌浜嬩欢
-        private void XhsProjectSimulationFunctionMgrCtrl1_CompareProjectWorkingEvent(DevExpress.Utils.Svg.SvgImage obj)
+        //鏄剧ず椤圭洰绔欐柟妗堝伐鍐典簨浠�
+        private void XhsProjectSimulationFunctionMgrCtrl1_ShowProjectSiteSchemeWorkingEvent
+            (XhsProjectVmo project, XhsProjectSiteVmo projectSite, XhsSchemeVmo scheme, Yw.Model.HydroModelInfo hydroInfo, HydroWorkingVmo working, SvgImage svgImage)
         {
-
-        }
-
-        //鏄剧ず椤圭洰宸ュ喌浜嬩欢
-        private void XhsProjectSimulationFunctionMgrCtrl1_ShowProjectWorkingEvent(HydroWorkingVmo arg1, DevExpress.Utils.Svg.SvgImage arg2)
-        {
-
+            lock (_locker)
+            {
+                var guid = new PageGuid()
+                {
+                    Modular = this.PageGuid.Modular,
+                    MoudingType = eMoudingType.Tab,
+                    Function = SimulationFunctionHelper.Working,
+                    TagName = working.ID.ToString()
+                };
+                if (!IsExistPage(guid, true))
+                {
+                    var page = new XhsProjectSimulationWorkingPage();
+                    page.PageTitle.HeaderSvgImage = svgImage;
+                    page.SetBindingData(project, projectSite, scheme, hydroInfo, working);
+                    CreatePage(page, guid);
+                }
+            }
         }
 
         #endregion

--
Gitblit v1.9.3