namespace HStation.WinFrmUI { public partial class XhsProjectSimulationInfoPage : DocumentPage { public XhsProjectSimulationInfoPage() { InitializeComponent(); this.PageTitle.Caption = "项目概况"; //this.PageTitle.HeaderSvgImage = this.svgImg32[0]; } private XhsProjectVmo _project = null;//项目 private XhsProjectSiteVmo _projectSite = null;//项目站 private Yw.Model.HydroModelInfo _hydroInfo = null;//水力信息 /// /// 绑定数据 /// public void SetBindingData(XhsProjectVmo project, XhsProjectSiteVmo projectSite, Yw.Model.HydroModelInfo hydroInfo) { if (project == null) { return; } _project = project; _projectSite = projectSite; _hydroInfo = hydroInfo; this.PageTitle.Caption = $"项目概况"; } /// /// 初始化数据 /// public override void InitialDataSource() { base.InitialDataSource(); } private async void widgetView1_QueryControl(object sender, DevExpress.XtraBars.Docking2010.Views.QueryControlEventArgs e) { switch (e.Document.Tag) { case "project-info": { var ctrl = new XhsProjectSimulationProjectInfoCtrl(); e.Control = ctrl; ctrl.SetBindingData(_project); } break; case "bimface-info": { var ctrl = new XhsProjectSimulationBimfaceInfoCtrl(); e.Control = ctrl; await ctrl.SetBindingData(_project, _projectSite); } break; case "parter-list-info": { var ctrl = new XhsProjectSimulationHydroInfoCtrl(); e.Control = ctrl; await ctrl.SetBindingData(_project, _projectSite, _hydroInfo); } break; default: break; } } } }