From f45bba0b5ecf73df67af6cb60e57ea956d82a8ab Mon Sep 17 00:00:00 2001
From: lixiaojun <1287241240@qq.com>
Date: 星期二, 30 七月 2024 14:36:10 +0800
Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0

---
 WinFrmUI/HStation.WinFrmUI.Xhs.Core/01-home/HomeXhsProjectPage.cs |   65 +++++++++++++++++++++++++++++++-
 1 files changed, 62 insertions(+), 3 deletions(-)

diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/01-home/HomeXhsProjectPage.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/01-home/HomeXhsProjectPage.cs
index 6e683c2..5741839 100644
--- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/01-home/HomeXhsProjectPage.cs
+++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/01-home/HomeXhsProjectPage.cs
@@ -7,24 +7,83 @@
             InitializeComponent();
             this.layoutControl1.SetupLayoutControl();
             this.PageTitle.Caption = "棣栭〉";
+            this.PageTitle.HeaderSvgImage = this.svgImg32[0];
+            this.PageTitle.SvgImageSize = new Size(24, 24);
+            this.PageTitle.AllowClose = false;
         }
 
         private Lazy<BLL.XhsProjectStd> _bllProjectStd = new(() => new BLL.XhsProjectStd());
+        private List<XhsProjectStdDto> _allProjectList = null;
 
+        /// <summary>
+        /// 鍒濆鍖栨暟鎹簮
+        /// </summary>
         public override async void InitialDataSource()
         {
-            var allProjectList = await _bllProjectStd.Value.GetAll();
-            this.homeXhsProjectTreeListCtrl1.SetBindingData(allProjectList);
+            _allProjectList = await _bllProjectStd.Value.GetAll();
+            this.tileItemForProject.Text = (_allProjectList == null ? 0 : _allProjectList.Count).ToString();
+            this.mapViewProjectListContainer1.LoadCompletedEvent += MapViewProjectListContainer1_LoadCompletedEvent;
             await this.mapViewProjectListContainer1.InitialContainer();
         }
 
+        /// <summary>
+        /// 鍒锋柊鏁版嵁
+        /// </summary>
+        public override async void RefreshData()
+        {
+            base.RefreshData();
+            _allProjectList = await _bllProjectStd.Value.GetAll();
+            this.tileItemForProject.Text = (_allProjectList == null ? 0 : _allProjectList.Count).ToString();
+            await this.mapViewProjectListContainer1.SetProjectList(_allProjectList);
+            this.homeXhsProjectTreeListCtrl1.SetBindingData(_allProjectList);
+        }
+
+        //鍦板浘鍔犺浇瀹屾垚
+        private async void MapViewProjectListContainer1_LoadCompletedEvent()
+        {
+            await this.mapViewProjectListContainer1.SetProjectList(_allProjectList);
+            this.homeXhsProjectTreeListCtrl1.SetBindingData(_allProjectList);
+        }
+
+        //閫夋嫨椤圭洰浜嬩欢
         private async void homeXhsProjectTreeListCtrl1_SelectProjectEvent(XhsProjectStdDto obj)
         {
-            await this.mapViewProjectListContainer1.SelectProject(obj.ID.ToString());
+            await this.mapViewProjectListContainer1.SelectProject(obj.ID);
             var vm = new HomeXhsProjectPropertyViewModel(obj);
             this.homeXhsProjectPropertyCtrl1.SelectedObject = vm;
         }
 
+        //瀵煎叆瀹屾垚浜嬩欢
+        private void homeXhsProjectTreeListCtrl1_ImportProjectCompletedEvent(ImportXhsProjectViewModel obj)
+        {
+            RefreshData();
+        }
 
+        //璺宠浆浜嬩欢
+        private async void homeXhsProjectPropertyCtrl1_JumpDirectEvent(XhsProjectStdDto obj)
+        {
+            var guid = new PageGuid()
+            {
+                Modular = Yw.WinFrmUI.PageModular.Bimface,
+                MoudingType = Yw.WinFrmUI.Page.eMoudingType.Tab,
+                Function = Yw.WinFrmUI.PageFunction.ViewBimface3d,
+                TagName = $"{obj.ID}"
+            };
+
+            if (!IsExistPage(guid, true))
+            {
+                var page = new ViewXhsProjectBimfacePage();
+                await page.SetBindingData(obj.ID);
+                CreatePage(page, guid);
+            }
+
+
+        }
+
+        //鍒锋柊鏁版嵁浜嬩欢
+        private void homeXhsProjectTreeListCtrl1_RefreshDataEvent()
+        {
+            RefreshData();
+        }
     }
 }

--
Gitblit v1.9.3