From d87400af518ebc9274f4447f06476959c3aa5102 Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期二, 14 七月 2020 16:29:42 +0800
Subject: [PATCH] Merge branch 'dev-tzy' into dev-2020xm

---
 ZigbeeApp/Shared/Phone/UserView/UserPage.cs |   31 +++++++++++++++++++++++++++----
 1 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserView/UserPage.cs b/ZigbeeApp/Shared/Phone/UserView/UserPage.cs
index 86a34af..c7009e5 100755
--- a/ZigbeeApp/Shared/Phone/UserView/UserPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserView/UserPage.cs
@@ -52,7 +52,15 @@
         /// <summary>
         /// 濡傛灉璁剧疆姝ゅ彉閲忎负true,鍒欏湪鍗曞嚮搴曢儴鑿滃崟鏃�,寮哄埗鏃犳潯浠跺叏閮ㄥ埛鏂�
         /// </summary>
-        public bool RefreshForm = false;
+        public bool RefreshAllForm = false;
+        /// <summary>
+        /// 鍒锋柊涓婚〉
+        /// </summary>
+        public bool RefreshMainPageForm = false;
+        /// <summary>
+        /// 鍒锋柊鍒嗙被
+        /// </summary>
+        public bool RefreshCategoryForm = false;
 
         #endregion
 
@@ -66,6 +74,7 @@
             BackgroundColor = Shared.Common.ZigbeeColor.Current.MainColor;
             Shared.Application.LocationAction += (lon, lat) =>
             {
+                //涓婃姤缁忕含搴�
                 Login.AccountLogic.Instance.ReceiveAppLatAndLon(lon.ToString(), lat.ToString());
             };
         }
@@ -229,20 +238,20 @@
         /// <param name="handClick">鏄惁鏄墜鍔ㄧ偣鍑�</param>
         private void BottomMenuClickEvent(MenuSelectEnum selectEnum, bool handClick)
         {
-            if (this.RefreshForm == false && selectEnum == this.nowSelectMenu && handClick == true)
+            if (this.RefreshAllForm == false && selectEnum == this.nowSelectMenu && handClick == true)
             {
                 //鎵嬪姩鐐瑰嚮鍚屼竴涓彍鍗�,鍒欎笉鍋氬鐞�
                 return;
             }
 
             //濡傛灉寮哄埗鎸囧畾鍒锋柊鐣岄潰鐨勮瘽
-            if (this.RefreshForm == true)
+            if (this.RefreshAllForm == true)
             {
                 //鍏ㄩ儴鍒锋柊
                 this.listForm = new List<EditorCommonForm>() { null, null, null };
                 this.bodyFrameView.RemoveAll();
 
-                this.RefreshForm = false;
+                this.RefreshAllForm = false;
             }
 
             this.nowSelectMenu = selectEnum;
@@ -252,6 +261,13 @@
             {
                 //宸︽粦鑿滃崟鍙�
                 CommonPage.Instance.IsDrawerLockMode = false;
+                if (this.RefreshMainPageForm == true)
+                {
+                    //鍒锋柊涓婚〉
+                    listForm[0]?.CloseForm();
+                    listForm[0] = null;
+                    this.RefreshMainPageForm = false;
+                }
                 if (listForm[0] == null)
                 {
                     var form = new MainPage.HomeMainPageForm();
@@ -265,6 +281,13 @@
             {
                 //宸︽粦鑿滃崟涓嶅彲
                 CommonPage.Instance.IsDrawerLockMode = true;
+                if (this.RefreshCategoryForm == true)
+                {
+                    //鍒锋柊鍒嗙被
+                    listForm[1]?.CloseForm();
+                    listForm[1] = null;
+                    this.RefreshCategoryForm = false;
+                }
                 if (listForm[1] == null)
                 {
                     var form = new Category.CategoryMainForm();

--
Gitblit v1.8.0