duheng
2024-12-27 1c3e5bc50d3045d51cb9a9f747d53442b82d9e2c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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;//水力信息
 
        /// <summary>
        /// 绑定数据
        /// </summary>
        public void SetBindingData(XhsProjectVmo project, XhsProjectSiteVmo projectSite, Yw.Model.HydroModelInfo hydroInfo)
        {
            if (project == null)
            {
                return;
            }
            _project = project;
            _projectSite = projectSite;
            _hydroInfo = hydroInfo;
            this.PageTitle.Caption = $"项目概况";
        }
 
        /// <summary>
        /// 初始化数据
        /// </summary>
        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;
            }
        }
 
 
    }
}