From 43b0d5870d528f23ecd6aeceb6cfd4325188b46f Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期四, 01 七月 2021 15:50:43 +0800
Subject: [PATCH] Revert "1"

---
 HDL_ON/UI/UI0-Stan/Logic/HdlFormLogic.cs |   57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 56 insertions(+), 1 deletions(-)

diff --git a/HDL_ON/UI/UI0-Stan/Logic/HdlFormLogic.cs b/HDL_ON/UI/UI0-Stan/Logic/HdlFormLogic.cs
index dd40fac..df687cc 100644
--- a/HDL_ON/UI/UI0-Stan/Logic/HdlFormLogic.cs
+++ b/HDL_ON/UI/UI0-Stan/Logic/HdlFormLogic.cs
@@ -115,6 +115,8 @@
                 try
                 {
                     var Myform = actionForm as EditorCommonForm;
+                    //閲嶇疆宸︽粦浣胯兘
+                    Myform.ScrollLeftEnabled = Myform.ScrollLeftEnabled;
                     //瑙﹀彂鐣岄潰鍐嶆婵�娲荤殑浜嬩欢
                     Myform.FormActionAgainEvent();
                 }
@@ -147,7 +149,8 @@
         /// 璁惧鐘舵�佹洿鏂版帹閫�
         /// </summary>
         /// <param name="i_LocalDevice">鏈湴璁惧瀵硅薄</param>
-        public void DeviceStatuPush(Entity.Function i_LocalDevice)
+        /// <param name="refreshCardContr">鏄惁鍒锋柊涓婚〉,鍒嗙被,鎴块棿绛夌瓑鐨勮澶囧崱鐗囩殑鐘舵��,榛樿涓嶅埛鏂�(姝ゅ彉閲忕洰鍓嶆槸缁檅us鎺ユ敹閭i噷浣跨敤鐨�)</param>
+        public void DeviceStatuPush(Entity.Function i_LocalDevice, bool refreshCardContr = false)
         {
             HdlThreadLogic.Current.RunMain(() =>
             {
@@ -155,14 +158,66 @@
                 {
                     this.ListActionForm[i]?.DeviceStatuPush(i_LocalDevice);
                 }
+                if (refreshCardContr == true)
+                {
+                    //鍒锋柊涓婚〉,鍒嗙被,鎴块棿绛夌瓑鐨勮澶囧崱鐗囩姸鎬�
+                    this.RefreshAllDeviceCardControl(i_LocalDevice);
+                }
+
             }, ShowErrorMode.NO);
         }
 
         #endregion
 
+        #region 鈻� 鎵嬪姩鍒锋柊鍚勮澶囧崱鐗嘷________________
+
+        /// <summary>
+        /// 鎵嬪姩鍒锋柊涓婚〉,鍒嗙被,鎴块棿绛夌瓑鐨勮澶囧崱鐗囩姸鎬�
+        /// </summary>
+        /// <param name="i_device">闇�瑕佸埛鏂扮殑璁惧瀵硅薄</param>
+        public void RefreshAllDeviceCardControl(Entity.Function i_device)
+        {
+            //鍒锋柊涓婚〉
+            UI.HomePage.UpdataFunctionStates(i_device);
+            //鍒锋柊鍒嗙被
+            UI.ClassificationPage.UpdataInfo(i_device);
+            //鍒锋柊鎴块棿
+            UI.RoomPage.UpdataStates(i_device);
+            //鍒锋柊鍔熻兘
+            UI.FunctionPage.UpdataStates(i_device);
+        }
+
+        #endregion
+
         #region 鈻� 涓�鑸柟娉昣__________________________
 
         /// <summary>
+        /// 鍏抽棴鎵�鏈夋墦寮�浜嗙殑鐣岄潰
+        /// </summary>
+        /// <param name="tagetFrom">鐩爣鐣岄潰,濡傛灉鎸囧畾浜嗙殑璇�,鍒欏叧闂洰鏍囩晫闈笂灞傜殑鍏ㄩ儴鐣岄潰(瀹冭嚜韬笉鍏抽棴)</param>
+        public void CloseAllOpenForm(string tagetFrom = null)
+        {
+            //鏈�鍚庝竴涓槸瑁呰浇涓婚〉鐨勫鍣�,鎵�浠ヤ笉鑳藉垹闄�
+            while (MainPage.BasePageView.ChildrenCount > 1)
+            {
+                var view = MainPage.BasePageView.GetChildren(MainPage.BasePageView.ChildrenCount - 1);
+                if (view is CommonFormBase)
+                {
+                    if (((CommonFormBase)view).FormID == tagetFrom)
+                    {
+                        //鍙叧闂埌鎸囧畾鐩爣鐣岄潰
+                        return;
+                    }
+                    ((CommonFormBase)view).CloseForm();
+                }
+                else
+                {
+                    view.RemoveFromParent();
+                }
+            }
+        }
+
+        /// <summary>
         /// 鑾峰彇褰撳墠姝e湪婵�娲荤殑鐣岄潰
         /// </summary>
         /// <returns></returns>

--
Gitblit v1.8.0