From 2450c12c825ad4d78d1572da2fa421706db2df2f Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 18 六月 2020 16:01:14 +0800
Subject: [PATCH] 新代码

---
 ZigbeeApp/Shared/Phone/UserView/UserPage.cs |   81 ++++++++++++++++++++++++++++++++--------
 1 files changed, 64 insertions(+), 17 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserView/UserPage.cs b/ZigbeeApp/Shared/Phone/UserView/UserPage.cs
old mode 100644
new mode 100755
index f0f4d8d..908cda3
--- a/ZigbeeApp/Shared/Phone/UserView/UserPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserView/UserPage.cs
@@ -49,6 +49,10 @@
         /// 鎺т欢缂撳瓨(鐪嬩笉鎳傜殑璇�,涓嶈鍔ㄥ畠)
         /// </summary>
         private List<ButtonBase> listButton = new List<ButtonBase>();
+        /// <summary>
+        /// 濡傛灉璁剧疆姝ゅ彉閲忎负true,鍒欏湪鍗曞嚮搴曢儴鑿滃崟鏃�,寮哄埗鏃犳潯浠跺叏閮ㄥ埛鏂�
+        /// </summary>
+        public bool RefreshForm = false;
 
         #endregion
 
@@ -76,10 +80,10 @@
                 return;
             }
 #if iOS
-            if (Shared.Application.PhoneType >= 10)
-            {
-                //楂樼増鏈殑鑻规灉鏈哄瀷锛屽睆骞曞簳閮ㄤ細鏈変竴涓粦鑹茬殑鏉�
-                ControlCommonResourse.BottomFrameHeight = Application.GetRealHeight(242);
+            if (Shared.Application.PhoneType >= 10)
+            {
+                //楂樼増鏈殑鑻规灉鏈哄瀷锛屽睆骞曞簳閮ㄤ細鏈変竴涓粦鑹茬殑鏉�
+                ControlCommonResourse.BottomFrameHeight = Application.GetRealHeight(242);
             }
 #endif
             //鐢ㄦ埛涓讳綋鐣岄潰锛堜腑闂撮儴鍒嗭級
@@ -214,10 +218,10 @@
             this.BottomMenuClickEvent(MenuSelectEnum.A涓婚〉, false);
         }
 
-#endregion
+        #endregion
 
-#region 鈻� 涓�鑸柟娉昣__________________________
-
+        #region 鈻� 涓�鑸柟娉昣__________________________
+
         /// <summary>
         /// 搴曢儴鑿滃崟鐨勭偣鍑讳簨浠�
         /// </summary>
@@ -225,11 +229,22 @@
         /// <param name="handClick">鏄惁鏄墜鍔ㄧ偣鍑�</param>
         private void BottomMenuClickEvent(MenuSelectEnum selectEnum, bool handClick)
         {
-            if (selectEnum == this.nowSelectMenu && handClick == true)
+            if (this.RefreshForm == false && selectEnum == this.nowSelectMenu && handClick == true)
             {
                 //鎵嬪姩鐐瑰嚮鍚屼竴涓彍鍗�,鍒欎笉鍋氬鐞�
                 return;
             }
+
+            //濡傛灉寮哄埗鎸囧畾鍒锋柊鐣岄潰鐨勮瘽
+            if (this.RefreshForm == true)
+            {
+                //鍏ㄩ儴鍒锋柊
+                this.listForm = new List<EditorCommonForm>() { null, null, null };
+                this.bodyFrameView.RemoveAll();
+
+                this.RefreshForm = false;
+            }
+
             this.nowSelectMenu = selectEnum;
 
             //涓婚〉
@@ -314,15 +329,47 @@
             //鍏抽棴鍏ㄩ儴鐣岄潰,鐩村埌涓婚〉涓烘
             UserCenterLogic.CloseAllOpenForm();
             //寮哄埗鏄剧ず鑷姩鍖栧垪琛ㄧ晫闈�
-            UserCenterResourse.ResidenceOption.CategoryPageSwitchIndex = 2;
-
-            this.BottomMenuClickEvent(MenuSelectEnum.A鍒嗙被, false);
+            UserCenterResourse.ResidenceOption.CategoryPageSwitchIndex = 2;
+
+            this.nowSelectMenu = MenuSelectEnum.A鍒嗙被;
+
+            //宸︽粦鑿滃崟涓嶅彲
+            CommonPage.Instance.IsDrawerLockMode = true;
+            if (listForm[1] == null)
+            {
+                var form = new Category.CategoryMainForm();
+                this.bodyFrameView.AddChidren(form);
+                form.ShowForm();
+                //鍔犵紦瀛�
+                listForm[1] = form;
+            }
+            else
+            {
+                ((Category.CategoryMainForm)listForm[1]).RefreshBodyView();
+            }
+            //璁剧疆鍏ㄩ儴鎺т欢鐨勫悇绉嶇姸鎬佺姸鎬�
+            this.SetAllControlStatu();
         }
 
-#endregion
+        /// <summary>
+        /// 鑾峰彇褰撳墠婵�娲荤殑鐣岄潰
+        /// </summary>
+        /// <returns></returns>
+        public EditorCommonForm GetNowActionForm()
+        {
+            int index = ((int)this.nowSelectMenu) - 1;
+            if (index != -1)
+            {
+                //璋冪敤姝ょ晫闈㈢殑婵�娲诲嚱鏁�
+                return this.listForm[index];
+            }
+            return null;
+        }
 
-#region 鈻� 缁撴瀯浣揰____________________________
-
+        #endregion
+
+        #region 鈻� 缁撴瀯浣揰____________________________
+
         /// <summary>
         /// 鑿滃崟閫夋嫨鐨勬灇涓�
         /// </summary>
@@ -332,8 +379,8 @@
             A涓婚〉 = 1,
             A鍒嗙被 = 2,
             A涓汉涓績 = 3
-        }
-
-#endregion
+        }
+
+        #endregion
     }
 }

--
Gitblit v1.8.0