Shuxia Ning
2024-11-11 f866efa3f12f68bc1f21ed5c9b76ead436009b04
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/01-info/XhsProjectSimulationInfoPage.cs
@@ -1,4 +1,5 @@
using HStation.Vmo;
using System.Reflection;
namespace HStation.WinFrmUI
{
@@ -48,7 +49,7 @@
        /// <summary>
        /// 初始化数据
        /// </summary>
        public override async void InitialDataSource()
        public override void InitialDataSource()
        {
            base.InitialDataSource();
            if (_project == null)
@@ -56,14 +57,36 @@
                return;
            }
            this.PageTitle.Caption = $"{_project.Name}\r\n项目概况";
            this.xhsProjectSimulationProjectInfoCtrl1.SetBindingData(_project);
            await this.xhsProjectSimulationBimfaceInfoCtrl1.SetBindingData(_project, _projectSite);
            await this.xhsProjectSimulationHydroInfoCtrl1.SetBindingData(_project, _projectSite, _hydroInfo);
        }
        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;
            }
        }
    }
}