From 0fd4a678c2218c42d383e964a6b4aca975aa7b7a Mon Sep 17 00:00:00 2001 From: Shuxia Ning <NingShuxia0927@outlook.com> Date: 星期一, 02 十二月 2024 14:32:51 +0800 Subject: [PATCH] 图表修改 --- WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/XhsProjectSimulationMgrPage.cs | 75 ++++++++++++++++++++++++++++++++----- 1 files changed, 65 insertions(+), 10 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/XhsProjectSimulationMgrPage.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/XhsProjectSimulationMgrPage.cs index 09062f4..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; @@ -18,6 +20,8 @@ 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;//椤圭洰 @@ -63,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) { @@ -85,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) { @@ -112,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) { @@ -158,18 +162,69 @@ } //椤圭洰绔欐柟妗堝垱寤轰簨浠� - private async void XhsProjectSimulationFunctionMgrCtrl1_CreateProjectSiteSchemeEvent - (XhsProjectVmo project, XhsProjectSiteVmo projectSite, DevExpress.Utils.Svg.SvgImage svgImage) + private void XhsProjectSimulationFunctionMgrCtrl1_CreateProjectSiteSchemeEvent + (XhsProjectVmo project, XhsProjectSiteVmo projectSite, Yw.Model.HydroModelInfo hydroInfo, SvgImage svgImage) { + WaitFormHelper.ShowWaitForm(this.FindForm(), "姝e湪鍔犺浇妯″瀷锛岃绋嶄警..."); var dlg = new AddXhsSchemeDlg(); - - await dlg.SetBindingData(project, projectSite, null); + dlg.Shown += delegate { WaitFormHelper.HideWaitForm(this.FindForm()); }; + dlg.ReloadDataEvent += (rhs) => + { + this.xhsProjectSimulationFunctionMgrCtrl1.AppendScheme(rhs); + }; + dlg.SetBindingData(project, projectSite, hydroInfo); dlg.ShowDialog(); } + //鏄剧ず椤圭洰绔欐柟妗堜簨浠� + 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_ShowProjectSiteSchemeWorkingEvent + (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 = 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