| | |
| | | using DevExpress.Drawing; |
| | | using DevExpress.Utils.Svg; |
| | | using DevExpress.Utils.Svg; |
| | | using DevExpress.XtraBars.Docking; |
| | | using DevExpress.XtraBars.Docking2010.Views; |
| | | using Yw.Vmo; |
| | |
| | | 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; |
| | |
| | | { |
| | | var page = new XhsProjectSimulationCorePage(); |
| | | page.PageTitle.HeaderSvgImage = svgImage; |
| | | page.AppendWorkingEvent += (working) => |
| | | page.GetModelEvent += (s) => |
| | | { |
| | | //增加工况事件 |
| | | this.simulationFunctionMgrCtrl1.AppendWorking(scheme, working); |
| | | }; |
| | | page.SaveModelEvent += (rhs) => |
| | | { |
| | | //保存模型事件 |
| | | return this.simulationFunctionMgrCtrl1.SaveModel(scheme, rhs); |
| | | //获取模型事件 |
| | | return this.simulationFunctionMgrCtrl1.GetModel(scheme); |
| | | }; |
| | | page.RefreshModelEvent += () => |
| | | { |
| | | //刷新模型事件 |
| | | return this.simulationFunctionMgrCtrl1.RefreshModel(scheme); |
| | | }; |
| | | page.AppendWorkingEvent += (working) => |
| | | { |
| | | //增加工况事件 |
| | | 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.UpdateSchemeEvent += (rhs) => |
| | | { |
| | | //更新方案事件 |
| | |
| | | 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) |
| | |
| | | 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) |
| | |
| | | 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 |
| | | ( |