From dc0309e64f02227d8e1468b7326c07955f804612 Mon Sep 17 00:00:00 2001
From: chenqiyang <1406175257@qq.com>
Date: 星期三, 22 六月 2022 11:22:18 +0800
Subject: [PATCH] 修改引用路径

---
 ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs |  130 +++++++++++++++++++++++++++++++++++++-----
 1 files changed, 113 insertions(+), 17 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs
old mode 100755
new mode 100644
index fba957b..716f9ac
--- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs
@@ -13,7 +13,7 @@
         /// <summary>
         /// 涓昏彍鍗曡儗鏅
         /// </summary>
-        private FrameLayout frameMainMenuBack = null;
+        private NormalFrameLayout frameMainMenuBack = null;
         /// <summary>
         /// 鍏朵粬鑿滃崟鐨勫鍣ㄦ帶浠�
         /// </summary>
@@ -50,17 +50,20 @@
         /// </summary>
         public void ShowForm()
         {
+            this.FormID = "UserMainForm";
+
             //鐗规畩澶勭悊锛氭仮澶嶅彲鍏抽棴杩涘害鏉★紝鍒棶涓轰粈涔堬紝鎴戜篃涓嶇煡閬撲负浠�涔堬紝浠ラ槻涓囦竴鑰屽凡
             ProgressBar.SetCloseBarFlag(false);
-            //鍒濆鍖栨鏋�
-            this.InitForm();
+            //鍒濆鍖栧ご閮ㄦ帶浠�
+            this.InitTopFrameLayout();
+            //鍒濆鍖栦腑閮ㄦ帶浠�
+            this.InitBodyFrameLayout();
             //绉婚櫎杩斿洖閿�
             base.RemoveBackButton();
 
             //body鍗犲畬鏁翠釜灞忓箷,闄や簡搴曢儴鑿滃崟
             bodyFrameLayout.Y = 0;
-            bodyFrameLayout.Height = ControlCommonResourse.TopMenuFrameHeight + ControlCommonResourse.TopFrameHeight
-                + ControlCommonResourse.BodyFrameHeight - ControlCommonResourse.BottomFrameHeight;
+            bodyFrameLayout.Height = this.Height;
             bodyFrameLayout.BackgroundColor = UserCenterColor.Current.BlackBackGround;
 
             //鍒濆鍖栦腑閮ㄦ帶浠�
@@ -76,7 +79,7 @@
             this.ClearBodyFrame();
 
             //涓汉涓績
-            var btnTitle = new NormalViewControl(350, 100, true);
+            var btnTitle = new NormalViewControl(450, 100, true);
             btnTitle.X = ControlCommonResourse.XXLeft;
             btnTitle.Y = Application.GetRealHeight(112);
             btnTitle.TextColor = UserCenterColor.Current.White;
@@ -132,15 +135,33 @@
         {
             //鐢ㄦ埛澶村儚
             this.btnUserIcon = new ImageView();
-            btnUserIcon.Height = Application.GetMinRealAverage(280);
-            btnUserIcon.Width = Application.GetMinRealAverage(280);
-            btnUserIcon.Radius = (uint)Application.GetMinRealAverage(280) / 2;
+            btnUserIcon.Height = this.GetPictrueRealSize(280);
+            btnUserIcon.Width = this.GetPictrueRealSize(280);
+            btnUserIcon.Radius = (uint)this.GetPictrueRealSize(280) / 2;
             btnUserIcon.X = Application.GetRealWidth(121);
-            btnUserIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(UserCenterResourse.UserInfo.UserIconFile);
+            if (Common.Config.Instance.Home.IsVirtually == false)
+            {
+                btnUserIcon.ImageBytes = Shared.IO.FileUtils.ReadFile(UserCenterResourse.UserInfo.UserIconFile);
+            }
+            else
+            {
+                btnUserIcon.ImagePath = "Account/Cat.png";
+            }
             bodyFrameLayout.AddChidren(btnUserIcon);
             btnUserIcon.Y = frameWhite.Y - Application.GetRealHeight(109);
             btnUserIcon.MouseUpEventHandler += (sender, e) =>
             {
+                if (Common.Config.Instance.Home.IsVirtually == true)
+                {
+                    //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欑洿鎺ユ彁绀�:纭畾閫�鍑哄綋鍓嶈处鍙凤紵
+                    string msg = Language.StringByID(R.MyInternationalizationString.uLogoutAccountMsg);
+                    this.ShowMassage(ShowMsgType.Confirm, msg, () =>
+                    {
+                        //閫�鍑鸿处鍙�
+                        UserCenterLogic.ReLoginAgain(Common.Config.Instance.Account);
+                    });
+                    return;
+                }
                 var form = new UserInformationForm();
                 form.AddForm();
             };
@@ -197,7 +218,7 @@
             else
             {
                 //鑳屾櫙妗�
-                frameMainMenuBack = new FrameLayout();
+                frameMainMenuBack = new NormalFrameLayout();
                 frameMainMenuBack.Y = Application.GetRealHeight(288);
                 frameMainMenuBack.Gravity = Gravity.CenterHorizontal;
                 frameMainMenuBack.Height = Application.GetRealHeight(371);
@@ -247,6 +268,11 @@
                 var frame = this.CreatMainMenuControl(frameMenu, TextID, unSelectPic);
                 frame.ButtonClickEvent += (sender, e) =>
                 {
+                    if (Common.Config.Instance.Home.IsVirtually == true)
+                    {
+                        //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
+                        return;
+                    }
                     var form = new Member.MemberListForm();
                     form.AddForm();
                 };
@@ -262,13 +288,16 @@
                 frame.ButtonClickEvent += (sender, e) =>
                 {
                     HdlGatewayLogic.Current.RefreshAppOldSelectGatewayId();
-                    if (string.IsNullOrEmpty(GatewayResourse.AppOldSelectGatewayId) == false)
+                    //鎷ユ湁缃戝叧,鎴栬�呮槸铏氭嫙浣忓畢,鍒欒繘鍏ヨ澶囧垪琛ㄧ晫闈�
+                    if (string.IsNullOrEmpty(GatewayResourse.AppOldSelectGatewayId) == false
+                    || Common.Config.Instance.Home.IsVirtually == true)
                     {
                         var form = new Device.DeviceListMainForm();
                         form.AddForm();
                     }
                     else
                     {
+                        //娌℃湁缃戝叧,鍒欒繘鍏ョ綉鍏冲垪琛ㄧ晫闈�
                         var form = new GatewayManage.GatewayListForm();
                         form.AddForm();
                     }
@@ -285,8 +314,31 @@
                 frame.ButtonClickEvent += (sender, e) =>
                 {
                     //浣忓畢鎺ュ彛涓嶉渶瑕佺壒娈婄殑鐧婚檰Token
-                    var form = new Residence.ResidenceListForm();
+                    var form = new Residence.ResidenceListMainForm();
                     form.AddForm();
+                };
+            }
+
+            //浜鸿劯绠$悊
+            unSelectPic = "Center/FaceManagement.png";
+            TextID = R.MyInternationalizationString.uFace;
+            if (UserCenterResourse.UserInfo.AuthorityNo == 1)//鏄富璐﹀彿鎵嶅睍绀�
+            {
+                //鐢熸垚鎺т欢
+                var frame = this.CreatMainMenuControl(frameMenu, TextID, unSelectPic);
+                frame.ButtonClickEvent += (sender, e) =>
+                {
+                    if (Common.Config.Instance.Home.IsVirtually == true)
+                    {
+                        //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
+                        return;
+                    }
+                    //鎵撳紑浜鸿劯绠$悊椤甸潰
+#if iOS
+
+                    Shared.IOS.HDLFVSDK.Video.ShowFaceManagement();
+#endif
+
                 };
             }
 
@@ -300,6 +352,11 @@
                 var frame = this.CreatMainMenuControl(frameMenu, TextID, unSelectPic);
                 frame.ButtonClickEvent += (sender, e) =>
                 {
+                    if (Common.Config.Instance.Home.IsVirtually == true)
+                    {
+                        //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
+                        return;
+                    }
                     var form = new Safety.SafetyManagementMainForm();
                     form.AddForm();
                 };
@@ -366,7 +423,36 @@
                 frameOtherMenuContr.Y = Application.GetRealHeight(698);
                 frameOtherMenuContr.Height = ControlCommonResourse.ListViewRowHeight * 4 + Application.GetRealHeight(26 * 4);
                 frameWhite.AddChidren(frameOtherMenuContr);
-            }
+            }
+
+            //鍙瀵硅
+            var rowVideo = new FrameRowControl(frameOtherMenuContr.rowSpace / 2);
+            frameOtherMenuContr.AddChidren(rowVideo);
+            //鍚戝彸鍥炬爣
+            var btnBackVDRight = rowVideo.AddRightArrow();
+            btnBackVDRight.X -= ControlCommonResourse.XXLeft / 2;
+            //鍥炬爣
+            var btnBackVDIcon = rowVideo.AddLeftIcon();
+            btnBackVDIcon.X -= ControlCommonResourse.XXLeft / 2;
+            btnBackVDIcon.UnSelectedImagePath = "Item/videoIntercom.png";
+            //搴曠嚎
+            var btnBackVDLine = rowVideo.AddBottomLine();
+            btnBackVDLine.X -= ControlCommonResourse.XXLeft / 2;
+            //鏁版嵁澶囦唤View
+            var btnBackVDView = rowVideo.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.videoIntercom), 300);
+            btnBackVDView.X -= ControlCommonResourse.XXLeft / 2;
+            rowVideo.ButtonClickEvent += (sender, e) =>
+            {
+                if (Common.Config.Instance.Home.IsVirtually == true)
+                {
+                    //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
+                    return;
+                }
+
+#if iOS
+                Shared.IOS.HDLFVSDK.Video.ShowDeviceList();
+#endif
+            };
 
             if (UserCenterResourse.UserInfo.AuthorityNo == 1 || UserCenterResourse.UserInfo.AuthorityNo == 2)
             {
@@ -388,8 +474,13 @@
                 btnBackView.X -= ControlCommonResourse.XXLeft / 2;
                 rowback.ButtonClickEvent += (sender, e) =>
                 {
-                    var form = new HdlBackup.HdlBackupListForm();
-                    form.AddForm();
+                    if (Common.Config.Instance.Home.IsVirtually == true)
+                    {
+                        //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥
+                        return;
+                    }
+                    var form = new HdlBackup.HdlBackupListForm();
+                    ; form.AddForm();
                 };
             }
 
@@ -434,7 +525,7 @@
             rowAbount.ButtonClickEvent += (sender, e) =>
             {
                 var form = new Abount.AbountForm();
-                form.AddForm();
+                form.AddForm(false);
             };
 
             if (UserCenterResourse.HideOption.CenterHideMenu == 1)
@@ -472,6 +563,11 @@
         /// </summary>
         public override int FormActionAgainEvent()
         {
+            //铏氭嫙浣忓畢涓嶉渶瑕佸埛鏂�
+            if (Common.Config.Instance.Home.IsVirtually == true)
+            {
+                return -1;
+            }
             //鐢ㄦ埛澶村儚
             if (UserCenterResourse.UserInfo.UserIconFileChanged == true)
             {

--
Gitblit v1.8.0