From 081ea8d273048fd03756718ac6fb48a3c09218e9 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期二, 29 十月 2019 13:10:00 +0800
Subject: [PATCH] Merge branch 'dev-tzy' into DEV_GXC

---
 ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs |   34 +++++++++++++++++++++++++++++-----
 1 files changed, 29 insertions(+), 5 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs
index 77ba2cb..fc53b31 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs
@@ -22,6 +22,14 @@
         /// 鐢ㄦ埛韬唤
         /// </summary>
         private NormalViewControl btnAuthority = null;
+        /// <summary>
+        /// 鐢ㄦ埛澶村儚
+        /// </summary>
+        private IconViewControl btnUserIcon = null;
+        /// <summary>
+        /// 鐨囧啝
+        /// </summary>
+        private IconViewControl btnImperialCrown = null;
 
         #endregion
 
@@ -99,7 +107,7 @@
         private void InitUserInfoControl(FrameLayout frameWhite)
         {
             //鐢ㄦ埛澶村儚
-            var btnUserIcon = new IconViewControl(280);
+            this.btnUserIcon = new IconViewControl(280);
             btnUserIcon.X = Application.GetRealWidth(121);
             btnUserIcon.UnSelectedImagePath = UserCenterResourse.UserInfo.UserIconFile;
             bodyFrameLayout.AddChidren(btnUserIcon);
@@ -113,7 +121,7 @@
             if (UserCenterResourse.UserInfo.AuthorityNo == 1)
             {
                 //鐨囧啝
-                var btnImperialCrown = new IconViewControl(60);
+                this.btnImperialCrown = new IconViewControl(60);
                 btnImperialCrown.X = Application.GetRealWidth(346);
                 btnImperialCrown.Y = Application.GetRealHeight(475);
                 btnImperialCrown.UnSelectedImagePath = "Center/ImperialCrown.png";
@@ -121,7 +129,7 @@
             }
 
             //鐢ㄦ埛鏄电О
-            btnUserName = new NormalViewControl(605, 60, true);
+            this.btnUserName = new NormalViewControl(605, 60, true);
             btnUserName.X = btnUserIcon.Right + Application.GetRealWidth(5);
             btnUserName.Y = Application.GetRealHeight(43);
             if (UserCenterResourse.UserInfo != null)
@@ -403,8 +411,11 @@
         /// </summary>
         public override int FormActionAgainEvent()
         {
-            //涓嶈鍒犻櫎杩欎釜鍑芥暟
-            base.FormActionAgainEvent();
+            //鐢ㄦ埛澶村儚
+            if (btnUserIcon.UnSelectedImagePath != UserCenterResourse.UserInfo.UserIconFile)
+            {
+                btnUserIcon.UnSelectedImagePath = UserCenterResourse.UserInfo.UserIconFile;
+            }
             //鐢ㄦ埛鍚嶅瓧
             btnUserName.Text = UserCenterResourse.UserInfo.UserName;
             if (UserCenterResourse.UserInfo != null)
@@ -412,6 +423,19 @@
                 //鐢ㄦ埛韬唤
                 btnAuthority.Text = UserCenterResourse.UserInfo.AuthorityText;
             }
+            if (this.btnImperialCrown != null)
+            {
+                //鐨囧啝
+                if (UserCenterResourse.UserInfo.AuthorityNo != 1)
+                {
+                    this.btnImperialCrown.Visible = false;
+                }
+                else
+                {
+                    this.btnImperialCrown.Visible = true;
+                }
+            }
+
             //鍒濆鍖栦富鑿滃崟鐨勬帶浠�
             this.InitMainMenuInfoControl(frameWhiteBack);
 

--
Gitblit v1.8.0