| | |
| | | this.PageTitle.HeaderSvgImage = this.svgImg32[0]; |
| | | this.PageTitle.SvgImageSize = new Size(24, 24); |
| | | |
| | | this.xhsProjectSimulationSchemeMgrCtrl1.ProjectSiteSelectedChangedEvent += XhsProjectSimulationSchemeMgrCtrl1_ProjectSiteSelectedChangedEvent; |
| | | this.xhsProjectSimulationFunctionMgrCtrl1.ProjectSiteSelectedChangedEvent += xhsProjectSimulationFunctionMgrCtrl1_ProjectSiteSelectedChangedEvent; |
| | | this.xhsProjectSimulationFunctionMgrCtrl1.ShowXhsProjectInfoEvent += XhsProjectSimulationFunctionMgrCtrl1_ShowXhsProjectInfoEvent; |
| | | this.xhsProjectSimulationFunctionMgrCtrl1.ShowXhsProjectSimulationEvent += XhsProjectSimulationFunctionMgrCtrl1_ShowXhsProjectSimulationEvent; |
| | | this.xhsProjectSimulationFunctionMgrCtrl1.CreateXhsProjectSchemeEvent += XhsProjectSimulationFunctionMgrCtrl1_CreateXhsProjectSchemeEvent; |
| | | this.xhsProjectSimulationFunctionMgrCtrl1.CompareXhsProjectSchemeEvent += XhsProjectSimulationFunctionMgrCtrl1_CompareXhsProjectSchemeEvent; |
| | | PumpFullInfoViewDlg.JumpPumpFullInfoCtrl += ShowPumpInfo; |
| | | } |
| | | |
| | | private long _projectId;//项目id |
| | | private XhsProjectVmo _project = null;//项目 |
| | | private XhsProjectSiteVmo _projectSite = null;//项目站 |
| | | private Yw.Model.HydroModelInfo _hydroInfo = null;//水力信息 |
| | | |
| | | /// <summary> |
| | | /// 初始化数据源 |
| | | /// </summary> |
| | | public override void InitialDataSource() |
| | | { |
| | | base.InitialDataSource(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 绑定数据 |
| | |
| | | } |
| | | _project = project; |
| | | _projectId = project.ID; |
| | | this.PageTitle.Caption = $"{_project.Name}\r\n水力模拟"; |
| | | await this.xhsProjectSimulationSchemeMgrCtrl1.SetBindingData(_project); |
| | | this.PageTitle.Caption = $"{_project.Name}\r\n项目模拟"; |
| | | await this.xhsProjectSimulationFunctionMgrCtrl1.SetBindingData(_project); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 初始化数据源 |
| | | /// </summary> |
| | | public override void InitialDataSource() |
| | | { |
| | | base.InitialDataSource(); |
| | | } |
| | | #region 功能面板 |
| | | |
| | | //项目站选择改变事件 |
| | | private async void XhsProjectSimulationSchemeMgrCtrl1_ProjectSiteSelectedChangedEvent(XhsProjectSiteVmo obj) |
| | | private async void xhsProjectSimulationFunctionMgrCtrl1_ProjectSiteSelectedChangedEvent(XhsProjectSiteVmo obj) |
| | | { |
| | | _projectSite = obj; |
| | | if (_projectSite != null) |
| | |
| | | var hydroRelation = await BLLFactory<Yw.BLL.HydroModelRelation>.Instance |
| | | .GetDefaultByObjectTypeAndObjectIDOfPurpose(HStation.Xhs.DataType.XhsProjectSite, _projectSite.ID, HStation.Xhs.Purpose.Simulation); |
| | | _hydroInfo = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance.GetByID(hydroRelation.ModelID); |
| | | this.xhsProjectSimulationFunctionMgrCtrl1.SetBindingData(); |
| | | this.xhsProjectSimulationFunctionMgrCtrl1.ResetBindingData(); |
| | | } |
| | | } |
| | | |
| | |
| | | await page.SetBindingData(_project, _projectSite, _hydroInfo); |
| | | CreatePage(page, guid); |
| | | } |
| | | |
| | | } |
| | | |
| | | //显示水力模拟事件 |
| | |
| | | { |
| | | return; |
| | | } |
| | | var dlg = new AddXhsProjectSimulationSchemeDlg(); |
| | | await dlg.SetBindingData(_projectSite.ID); |
| | | dlg.ReloadDataEvent += (scheme) => |
| | | { |
| | | this.xhsProjectSimulationSchemeMgrCtrl1.AppendScheme(scheme); |
| | | }; |
| | | //var dlg = new AddXhsProjectSimulationSchemeDlg(); |
| | | //await dlg.SetBindingData(_projectSite.ID); |
| | | //dlg.ReloadDataEvent += (scheme) => |
| | | //{ |
| | | // this.xhsProjectSimulationFunctionMgrCtrl1.AppendScheme(scheme); |
| | | //}; |
| | | //dlg.ShowDialog(); |
| | | |
| | | var dlg = new AddXhsSchemeDlg(); |
| | | await dlg.SetBindingData(_project, _projectSite, _hydroInfo); |
| | | dlg.ShowDialog(); |
| | | } |
| | | |
| | | //比较项目方案事件 |
| | | private void XhsProjectSimulationFunctionMgrCtrl1_CompareXhsProjectSchemeEvent(DevExpress.Utils.Svg.SvgImage obj) |
| | | { |
| | | |
| | | TipFormHelper.ShowWarn("正在开发中,敬请期待..."); |
| | | } |
| | | |
| | | #endregion 功能面板 |
| | | |
| | | #region TabbedView 相关事件处理程序 |
| | | |
| | |
| | | } |
| | | |
| | | #endregion Page |
| | | |
| | | private void ShowPumpInfo(PumpFullInfoCtrl pumpFullInfoCtrl) |
| | | { |
| | | var guid = new PageGuid() |
| | | { |
| | | Modular = this.PageGuid.Modular, |
| | | MoudingType = eMoudingType.Tab, |
| | | Function = "xhs-project-pump-info", |
| | | }; |
| | | if (!IsExistPage(guid, true)) |
| | | { |
| | | CreatePage(pumpFullInfoCtrl, guid); |
| | | } |
| | | } |
| | | } |
| | | } |