From f2333318a31e92f6cbc3a572d8eb9fae9da0f892 Mon Sep 17 00:00:00 2001
From: lixiaojun <1287241240@qq.com>
Date: 星期六, 12 十月 2024 13:59:15 +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/01-project/HomeXhsProjectTreeListCtrl.cs |   36 ++++++++++++++++++++++++------------
 1 files changed, 24 insertions(+), 12 deletions(-)

diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/01-home/01-project/HomeXhsProjectTreeListCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/01-home/01-project/HomeXhsProjectTreeListCtrl.cs
index 1f433dc..eece155 100644
--- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/01-home/01-project/HomeXhsProjectTreeListCtrl.cs
+++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/01-home/01-project/HomeXhsProjectTreeListCtrl.cs
@@ -1,4 +1,7 @@
 锘縰sing DevExpress.Utils;
+using HStation.Vmo;
+using NetTaste;
+using Yw.WinFrmUI.Page;
 
 namespace HStation.WinFrmUI
 {
@@ -9,17 +12,20 @@
             InitializeComponent();
             this.treeList1.InitialDefaultSettings();
             this.layoutControl1.SetupLayoutControl();
+            this.treeList1.SelectImageList = imageCollection1;
         }
 
         /// <summary>
         /// 閫夋嫨椤圭洰浜嬩欢
         /// </summary>
-        public event Action<XhsProjectStdDto> SelectProjectEvent;
+        public event Action<XhsProjectVmo> SelectProjectEvent;
 
         /// <summary>
         /// 鍒锋柊鏁版嵁浜嬩欢
         /// </summary>
         public event Action RefreshDataEvent;
+
+        public event Action<long> JumpDirectEvent;
 
         /// <summary>
         /// 椤圭洰瀵煎叆瀹屾垚浜嬩欢
@@ -31,9 +37,11 @@
         /// <summary>
         /// 缁戝畾鏁版嵁
         /// </summary>
-        public async void SetBindingData(List<XhsProjectStdDto> allProjectList)
+        public async void SetBindingData(List<XhsProjectVmo> allProjectList)
         {
             _allBindingList = new List<HomeXhsProjectTreeViewModel>();
+            if (allProjectList == null)
+                return;
             foreach (var item in allProjectList)
             {
                 if (await IsHaveBimFace(item.ID))
@@ -55,18 +63,18 @@
         //鏌ユ壘椤圭洰鏄惁瀛樺湪妯″瀷
         private async Task<bool> IsHaveBimFace(long ProjectID)
         {
-            var projectSite = await new BLL.XhsProjectSiteStd().GetDefaultByProjectID(ProjectID);
+            var projectSite = await BLLFactory<HStation.BLL.XhsProjectSite>.Instance.GetDefaultByProjectID(ProjectID);
             if (projectSite == null)
             {
                 return false;
             }
-            var relation = await new Yw.BLL.BimfaceFileRelationStd()
+            var relation = await BLLFactory<Yw.BLL.BimfaceFileRelation>.Instance
                .GetDefaultByObjectTypeAndObjectIDOfPurpose(HStation.Xhs.DataType.XhsProjectSite, projectSite.ID, Yw.Bimface.Purpose.Simulation);
             if (relation == null)
             {
                 return false;
             }
-            var bimfaceFile = await new Yw.BLL.BimfaceFileStd().GetByID(relation.BimfaceFileID);
+            var bimfaceFile = await BLLFactory<Yw.BLL.BimfaceFile>.Instance.GetByID(relation.BimfaceFileID);
             if (bimfaceFile == null)
             {
                 return false;
@@ -130,14 +138,18 @@
         }
 
         //榧犳爣鐐瑰嚮
-        private void treeList1_RowCellClick(object sender, DevExpress.XtraTreeList.RowCellClickEventArgs e)
+        private async void treeList1_RowCellClick(object sender, DevExpress.XtraTreeList.RowCellClickEventArgs e)
         {
-            //鏆傛椂涓嶇敤
-            //if (e.Button == MouseButtons.Left)
-            //{
-            //    var vm = this.treeList1.GetDataRecordByNode(e.Node) as HomeXhsProjectTreeViewModel;
-            //    this.SelectProjectEvent?.Invoke(vm.Project);
-            //}
+            if (_allBindingList == null || _allBindingList.Count < 1)
+                return;
+            var vm = this.treeList1.GetCurrentViewModel(_allBindingList);
+            if (vm == null)
+            {
+                return;
+            }
+            if (e.Column != this.colJump)
+                return;
+            JumpDirectEvent.Invoke(vm.Project.ID);
         }
 
         //鑱氱劍鑺傜偣鏀瑰彉

--
Gitblit v1.9.3