From efa99a6d5d1f6868969a02e772f77cd17de3ea83 Mon Sep 17 00:00:00 2001
From: lixiaojun <1287241240@qq.com>
Date: 星期二, 24 九月 2024 15:02:42 +0800
Subject: [PATCH] 新增自定义标签

---
 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-scheme/02-asset-mgr/XhsSchemeAssetMgrPage.cs |   55 ++++++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 48 insertions(+), 7 deletions(-)

diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-scheme/02-asset-mgr/XhsSchemeAssetMgrPage.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-scheme/02-asset-mgr/XhsSchemeAssetMgrPage.cs
index 3a50a97..ece24ca 100644
--- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-scheme/02-asset-mgr/XhsSchemeAssetMgrPage.cs
+++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-scheme/02-asset-mgr/XhsSchemeAssetMgrPage.cs
@@ -1,5 +1,6 @@
 锘縰sing DevExpress.CodeParser;
 using DevExpress.XtraEditors;
+using HStation.WinFrmUI.Xhs;
 using Yw.EPAnet;
 
 namespace HStation.WinFrmUI
@@ -12,19 +13,16 @@
             this.xhsProjectAssetsBimfaceCtrl1.ClickParterEvent += XhsProjectAssetsBimfaceCtrl1_ClickParterEvent;
         }
 
-
-
         private long _projectId;
         private Yw.Model.HydroModelInfo _hydro = null;
 
-
         /// <summary>
-        /// 
+        ///
         /// </summary>
         public async Task SetBindingData(long projectId)
         {
             _projectId = projectId;
-            var projectSite = await new HStation.BLL.XhsProjectSiteStd().GetDefaultByProjectID(projectId);
+            var projectSite = await BLLFactory<HStation.BLL.XhsProjectSite>.Instance.GetDefaultByProjectID(projectId);
             if (projectSite == null)
             {
                 return;
@@ -45,7 +43,6 @@
         {
             base.InitialDataSource();
             this.xhsProjectAssetsBimfaceCtrl1.SetBindingData(_projectId);
-
         }
 
         //bimface 鏋勪欢鐐瑰嚮
@@ -79,5 +76,49 @@
             var list = netWork.Calcu();
             XtraMessageBox.Show(JsonHelper.Object2FormatJson(list));
         }
+
+        //涓存椂---閫夋嫨娉靛瀷鍙�
+        private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
+        {
+            //  var dlg = new AssetsAutoMatchingMainDlg();
+            //     dlg.SetMatching();
+            //    dlg.ShowDialog();
+        }
+
+        private async void barButtonItem2_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
+        {
+            if (_hydro == null)
+            {
+                return;
+            }
+            var pumps = _hydro.Pumps;
+            var ids = pumps.Select(x => x.Code).Distinct().ToList();
+            await this.xhsProjectAssetsBimfaceCtrl1.TranslucentComponents(ids);
+        }
+
+        private async void barButtonItem3_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
+        {
+            if (_hydro == null)
+            {
+                return;
+            }
+            var pumps = _hydro.Pumps;
+            var ids = pumps.Select(x => x.Code).Distinct().ToList();
+            await this.xhsProjectAssetsBimfaceCtrl1.OpaqueComponents(ids);
+        }
+
+        private async void barButtonItem4_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
+        {
+            await this.xhsProjectAssetsBimfaceCtrl1.ShowAllComponents();
+        }
+
+        //鑷姩鍖归厤
+        private void barBtnAutoMatch_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
+        {
+            /*  var dlg = new AssetsAutoMatchingMainDlg();
+              dlg.SetMatching();
+              dlg.ShowDialog();
+  */
+        }
     }
-}
+}
\ No newline at end of file

--
Gitblit v1.9.3