duheng
2025-04-03 82f8a7ead37ff50dec3d0d40e572d4331f14a8b2
WinFrmUI/PBS.WinFrmUI/00-home/00-core/HomePbsProjectPage.cs
@@ -14,6 +14,8 @@
            this.PageTitle.SvgImageSize = new Size(24, 24);
            //   this.xhsProjectHomeTitleCtrl1.JumpEvent += XhsProjectHomeTitleCtrl1_JumpEvent;
            this.mapViewProjectListContainer2.LoadCompletedEvent += MapViewProjectListContainer1_LoadCompletedEvent;
            this.homePbsProjectTreeListCtrl1.SelectProjectEvent += homeXhsProjectTreeListCtrl1_SelectProjectEvent;
            this.homeXhsProjectPropertyCtrl2.SelectFacEvent += HomeXhsProjectPropertyCtrl2_SelectFacEvent;
        }
        private List<FacilityVmo> _allProjectList = null;//所有项目列表
@@ -24,7 +26,7 @@
        public override async void InitialDataSource()
        {
            base.InitialDataSource();
            //_allProjectList = await BLLFactory<HStation.BLL.XhsProject>.Instance.GetAll();
            _allProjectList = await new BLL.Facility().GetAll();
            //this.xhsProjectHomeTitleCtrl1.SetBindingData();
            await this.mapViewProjectListContainer2.InitialContainer();
        }
@@ -37,24 +39,33 @@
            base.RefreshData();
            _allProjectList = await new BLL.Facility().GetAll();
            //   this.xhsProjectHomeTitleCtrl1.SetBindingData();
            //  await this.mapViewProjectListContainer1.SetProjectList(_allProjectList);
            await this.mapViewProjectListContainer2.SetProjectList(_allProjectList);
            //  this.homeXhsProjectTreeListCtrl1.SetBindingData(_allProjectList);
        }
        //地图加载完成
        private async void MapViewProjectListContainer1_LoadCompletedEvent()
        {
            // await this.mapViewProjectListContainer1.SetProjectList(_allProjectList);
            await this.mapViewProjectListContainer2.SetProjectList(_allProjectList);
            //  this.homeXhsProjectTreeListCtrl1.SetBindingData(_allProjectList);
        }
        /*      //选择项目事件
              private async void homeXhsProjectTreeListCtrl1_SelectProjectEvent(XhsProjectVmo obj)
              {
                  await this.mapViewProjectListContainer1.SelectProject(obj.ID);
                  var vm = new HomeXhsProjectPropertyViewModel(obj);
                  this.homeXhsProjectPropertyCtrl1.SelectedObject = vm;
              }*/
        //选择项目事件
        private void homeXhsProjectTreeListCtrl1_SelectProjectEvent(PlaceVmo obj)
        {
            this.homeXhsProjectPropertyCtrl2.SetBindingData(obj);
            // var vm = new HomePbsProjectPropertyViewModel(obj);
            //this.homeXhsProjectPropertyCtrl2.SelectedObject = vm;
            /*   await this.mapViewProjectListContainer1.SelectProject(obj.ID);
              var vm = new HomeXhsProjectPropertyViewModel(obj);
              this.homeXhsProjectPropertyCtrl1.SelectedObject = vm;*/
        }
        private async void HomeXhsProjectPropertyCtrl2_SelectFacEvent(FacilityVmo obj)
        {
            await this.mapViewProjectListContainer2.SelectProject(obj.ID);
        }
        /*    //导入完成事件
            private void homeXhsProjectTreeListCtrl1_ImportProjectCompletedEvent(ImportXhsProjectViewModel obj)