From 97e259d966cb5cb5d73c105d5dbaadcc1f920614 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期五, 18 十月 2019 13:48:43 +0800
Subject: [PATCH] 合并了全部的代码

---
 ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs |   46 ++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 40 insertions(+), 6 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs
index 3ce4dde..cc179ac 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs
@@ -18,6 +18,18 @@
         /// 鐢ㄦ埛鍚嶅瓧
         /// </summary>
         private NormalViewControl btnUserName = null;
+        /// <summary>
+        /// 鐢ㄦ埛韬唤
+        /// </summary>
+        private NormalViewControl btnAuthority = null;
+        /// <summary>
+        /// 鐢ㄦ埛澶村儚
+        /// </summary>
+        private IconViewControl btnUserIcon = null;
+        /// <summary>
+        /// 鐨囧啝
+        /// </summary>
+        private IconViewControl btnImperialCrown = null;
 
         #endregion
 
@@ -95,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);
@@ -109,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";
@@ -117,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)
@@ -127,7 +139,7 @@
             frameWhite.AddChidren(btnUserName);
 
             //鐢ㄦ埛韬唤
-            var btnAuthority = new NormalViewControl(605, 60, true);
+            this.btnAuthority = new NormalViewControl(605, 60, true);
             btnAuthority.X = btnUserName.X;
             btnAuthority.Y = btnUserName.Bottom;
             btnAuthority.TextColor = UserCenterColor.Current.Gray;
@@ -244,7 +256,7 @@
                 frame.ButtonClickEvent += (sender, e) =>
                 {
                     //浣忓畢鎺ュ彛涓嶉渶瑕佺壒娈婄殑鐧婚檰Token
-                    var form = new Residence.ResidenceManagementForm();
+                    var form = new Residence.ResidenceListForm();
                     form.AddForm();
                 };
             }
@@ -397,12 +409,34 @@
         /// <summary>
         /// 鑷韩鐨勪笂灞傜晫闈㈠叧闂悗,瀹冭嚜韬浜庢渶涓婂眰鏃�,瑙﹀彂鐨勪簨浠�
         /// </summary>
-        public override void FormActionAgainEvent()
+        public override int FormActionAgainEvent()
         {
+            //鐢ㄦ埛澶村儚
+            btnUserIcon.UnSelectedImagePath = UserCenterResourse.UserInfo.UserIconFile;
             //鐢ㄦ埛鍚嶅瓧
             btnUserName.Text = UserCenterResourse.UserInfo.UserName;
+            if (UserCenterResourse.UserInfo != null)
+            {
+                //鐢ㄦ埛韬唤
+                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);
+
+            return 1;
         }
 
         #endregion

--
Gitblit v1.8.0