From 18b93d511dc764b469d7c4a7e755f7274f89cdb4 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期一, 27 四月 2020 17:55:14 +0800
Subject: [PATCH] 2020-4-27-1

---
 ZigbeeApp/Shared/Phone/CommonForm/EditorCommonForm.cs |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/CommonForm/EditorCommonForm.cs b/ZigbeeApp/Shared/Phone/CommonForm/EditorCommonForm.cs
index cc8fe56..d0417ce 100755
--- a/ZigbeeApp/Shared/Phone/CommonForm/EditorCommonForm.cs
+++ b/ZigbeeApp/Shared/Phone/CommonForm/EditorCommonForm.cs
@@ -15,6 +15,10 @@
         #region 鈻� 鍙橀噺澹版槑___________________________
 
         /// <summary>
+        /// 杩斿洖鎸夐敭鐨勭偣鍑讳簨浠�(濡傛灉瀹炵幇姝や簨浠�,鍒欏簳灞傜殑浜嬩欢灏嗕笉浼氬啀瑙﹀彂)
+        /// </summary>
+        public Action<BackViewControl> BackButtonClickEvent = null;
+        /// <summary>
         /// TopMenuFrameLayout
         /// </summary>
         public FrameLayout topMenuFrameLayout = null;
@@ -31,7 +35,7 @@
         /// </summary>
         private bool m_ScrollEnabled = true;
         /// <summary>
-        /// 宸︽粦浣胯兘
+        /// 宸︽粦浣胯兘(鐣岄潰鍏抽棴鏃�,搴曞眰浼氳繕鍘�,鏃犻渶鍐嶅鐞�)
         /// </summary>
         public bool ScrollEnabled
         {
@@ -124,6 +128,12 @@
             btnBack.InitControl();
             btnBack.ButtonClickEvent += (sender, e) =>
             {
+                if (this.BackButtonClickEvent != null)
+                {
+                    //濡傛灉瀹炵幇姝や簨浠�,鍒欏簳灞傜殑浜嬩欢灏嗕笉浼氬啀瑙﹀彂
+                    BackButtonClickEvent(btnBack);
+                    return;
+                }
                 //鐢婚潰鍏抽棴
                 this.CloseForm();
             };
@@ -209,6 +219,8 @@
 
             //宸︽粦浣胯兘
             this.ScrollEnabled = true;
+
+            this.BackButtonClickEvent = null;
 
             this.m_parameter = null;
             //娓呯┖bodyFrame
@@ -380,7 +392,11 @@
             {
                 return;
             }
-            bodyFrameLayout?.RemoveAll();
+            if (bodyFrameLayout == null || bodyFrameLayout.Parent == null)
+            {
+                return;
+            }
+            bodyFrameLayout.RemoveAll();
         }
 
         #endregion

--
Gitblit v1.8.0