From 3272ca5b51e19f7f8a827b0f68400570a547fe60 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期二, 28 四月 2020 15:02:44 +0800
Subject: [PATCH] 2020-04-28-1

---
 ZigbeeApp/Shared/Phone/CommonForm/EditorCommonForm.cs |   32 +++++++++++++++++++++++++++++---
 1 files changed, 29 insertions(+), 3 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/CommonForm/EditorCommonForm.cs b/ZigbeeApp/Shared/Phone/CommonForm/EditorCommonForm.cs
index 3d4ef08..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();
             };
@@ -134,7 +144,7 @@
             txttitle.Name = "txtTitle";
             txttitle.TextSize = 17;
             txttitle.X = Application.GetRealWidth(161);
-            txttitle.Height = Application.GetRealHeight(69);
+            txttitle.Height = Application.GetRealHeight(75);
             txttitle.Width = Application.GetRealWidth(850);
             txttitle.Gravity = Gravity.CenterVertical;
             txttitle.TextColor = UserCenterColor.Current.TopLayoutTitleText;
@@ -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
@@ -408,6 +424,16 @@
             back?.RemoveFromParent();
         }
 
+        /// <summary>
+        /// 鑾峰彇杩斿洖閿�
+        /// </summary>
+        public BackViewControl GetBackButton()
+        {
+            //绉婚櫎杩斿洖閿�
+            var back = (BackViewControl)topFrameLayout.GetTagByKey("btnBack");
+            return back;
+        }
+
         #endregion
     }
 }

--
Gitblit v1.8.0