From 25429f085093d89d543a0b90e30d0d62d1b7dac9 Mon Sep 17 00:00:00 2001
From: hxb <hxb@hdlchina.com.cn>
Date: 星期二, 30 八月 2022 09:37:38 +0800
Subject: [PATCH] 合并了IOS的代码

---
 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs |   92 ++++++++++++++++++++++++----------------------
 1 files changed, 48 insertions(+), 44 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs
index c9ef969..67009a0 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs
@@ -221,8 +221,8 @@
             btnFuncSet = new Button
             {
                 X = Application.GetRealWidth(103),
-                Height = Application.GetMinReal(69),
-                Width = Application.GetMinReal(69),
+                Height = Application.GetMinRealAverage(69),
+                Width = Application.GetMinRealAverage(69),
                 UnSelectedImagePath = "DoorLock/SettingIcon.png",
             };
             btnFuncSetFrameLayout.AddChidren(btnFuncSet);
@@ -231,7 +231,7 @@
 
             ClickHandle();
 
-            if (HdlDeviceCommonLogic.Current.CheckDeviceIsOnline(doorLock) == true)
+            if (Common.LocalDevice.Current.CheckDeviceIsOnline(doorLock) == true)
             {
                 ReadDoorLockUserInfo();
             }
@@ -255,7 +255,7 @@
                 Height = Application.GetRealHeight(1238),
                 Width = Application.GetRealWidth(965),
                 BackgroundColor = Shared.Common.ZigbeeColor.Current.XMWhite,
-                Radius = 6,
+                Radius = (uint)Application.GetRealHeight(17),
             };
             this.midFrameLayout.AddChidren(midTopFrameLayout);
 
@@ -264,8 +264,10 @@
             btnDoorLockTitle.Y = Application.GetRealHeight(46);
             btnDoorLockTitle.TextSize = 15;
             btnDoorLockTitle.IsBold = true;
-            btnDoorLockTitle.Text = HdlDeviceCommonLogic.Current.GetDeviceMacName(doorLock);
+            btnDoorLockTitle.Text = Common.LocalDevice.Current.GetDeviceMacName(doorLock);
             btnDoorLockTitle.Width = btnDoorLockTitle.GetRealWidthByText();
+            btnDoorLockTitle.Width = Application.GetRealWidth(500);
+
             btnDoorLockTitle.TextAlignment = TextAlignment.Center;
             btnDoorLockTitle.Gravity = Gravity.CenterHorizontal;
             midTopFrameLayout.AddChidren(btnDoorLockTitle);
@@ -280,8 +282,8 @@
             midTopFrameLayout.AddChidren(btnRecordFrameLayout);
             btnRecord = new Button()
             {
-                Width = Application.GetMinReal(69),
-                Height = Application.GetMinReal(69),
+                Width = Application.GetMinRealAverage(69),
+                Height = Application.GetMinRealAverage(69),
                 X = Application.GetRealWidth(46),
                 Y = Application.GetRealHeight(46),
                 UnSelectedImagePath = "DoorLock/RecordIcon.png",
@@ -298,8 +300,8 @@
             midTopFrameLayout.AddChidren(btnCollectFrameLayout);
             btnCollect = new Button()
             {
-                Width = Application.GetMinReal(69),
-                Height = Application.GetMinReal(69),
+                Width = Application.GetMinRealAverage(69),
+                Height = Application.GetMinRealAverage(69),
                 X = Application.GetRealWidth(15),
                 Y = Application.GetRealHeight(46),
                 UnSelectedImagePath = "Item/Collection.png",
@@ -340,8 +342,8 @@
             //闂ㄩ攣寮�/鍏冲浘鐗�
             btnDoorLockPic = new Button()
             {
-                Width = Application.GetMinReal(383),
-                Height = Application.GetMinReal(343),
+                Width = Application.GetMinRealAverage(383),
+                Height = Application.GetMinRealAverage(343),
                 X = Application.GetRealWidth(161),
                 Y = Application.GetRealHeight(415),
                 UnSelectedImagePath = "DoorLock/DoorLockPicClose.png",
@@ -380,7 +382,7 @@
             progressFrameLayoutMatch = new FrameLayout()
             {
                 Width = Application.GetRealHeight(84),//639-35
-                Height = Application.GetRealHeight(446),
+                Height = Application.GetRealHeight(446 + 30),
                 X = Application.GetMinReal(51),
                 BackgroundColor = ZigbeeColor.Current.XMWhite,
             };
@@ -388,7 +390,9 @@
 
             var progressFrameLayout = new FrameLayout()
             {
-                Width = Application.GetRealHeight(17),//639-35
+                Width = Application.GetRealHeight(15),//639-35
+                Height = Application.GetRealHeight(440),
+                Radius = (uint)Application.GetRealHeight(17),
                 Gravity = Gravity.CenterHorizontal,
                 BackgroundColor = ZigbeeColor.Current.XMVerticalSeekBar,
             };
@@ -396,8 +400,8 @@
 
             progressButton = new Button()
             {
-                Width = Application.GetMinReal(84),//639-35
-                Height = Application.GetMinReal(93),
+                Width = Application.GetMinRealAverage(84),//639-35
+                Height = Application.GetMinRealAverage(93),
                 Gravity = Gravity.CenterHorizontal,
                 Y = Application.GetRealHeight(347),
                 UnSelectedImagePath = "DoorLock/UnLockButton.png",
@@ -406,8 +410,8 @@
 
             btnDoorOpenPic = new Button()
             {
-                Width = Application.GetMinReal(81),
-                Height = Application.GetMinReal(81),
+                Width = Application.GetMinRealAverage(81),
+                Height = Application.GetMinRealAverage(81),
                 X = Application.GetRealWidth(164),
                 Y = Application.GetRealHeight(6),
                 UnSelectedImagePath = "DoorLock/DoorLockOpen.png",
@@ -416,8 +420,8 @@
 
             btnDoorClosePic = new Button()
             {
-                Width = Application.GetMinReal(81),
-                Height = Application.GetMinReal(81),
+                Width = Application.GetMinRealAverage(81),
+                Height = Application.GetMinRealAverage(81),
                 X = Application.GetRealWidth(164),
                 Y = Application.GetRealHeight(117),
                 UnSelectedImagePath = "DoorLock/DoorLockClose.png",
@@ -428,8 +432,8 @@
             //鐢甸噺
             btnPower = new Button()
             {
-                Width = Application.GetMinReal(81),
-                Height = Application.GetMinReal(81),
+                Width = Application.GetMinRealAverage(81),
+                Height = Application.GetMinRealAverage(81),
                 X = Application.GetRealWidth(253),
                 Y = Application.GetRealHeight(994),
                 UnSelectedImagePath = "DoorLock/PowerOffline.png",
@@ -447,8 +451,8 @@
             midTopFrameLayout.AddChidren(btnVolumeFrameLayout);
             btnVolume = new Button()
             {
-                Width = Application.GetMinReal(81),
-                Height = Application.GetMinReal(81),
+                Width = Application.GetMinRealAverage(81),
+                Height = Application.GetMinRealAverage(81),
                 X = Application.GetRealWidth(40),
                 Y = Application.GetRealHeight(40),
                 UnSelectedImagePath = "DoorLock/VolumeIcon.png",
@@ -459,16 +463,16 @@
             //甯稿紑
             btnNormallyOpenFrameLayout = new FrameLayout()
             {
-                Width = Application.GetRealWidth(81 + 80),
-                Height = Application.GetRealHeight(81 + 80),
+                Width = Application.GetMinRealAverage(81 + 80),
+                Height = Application.GetMinRealAverage(81 + 80),
                 X = Application.GetRealWidth(631 - 40),
                 Y = Application.GetRealHeight(994 - 40),
             };
             midTopFrameLayout.AddChidren(btnNormallyOpenFrameLayout);
             btnNormallyOpen = new Button()
             {
-                Width = Application.GetMinReal(81),
-                Height = Application.GetMinReal(81),
+                Width = Application.GetMinRealAverage(81),
+                Height = Application.GetMinRealAverage(81),
                 X = Application.GetRealWidth(40),
                 Y = Application.GetRealHeight(40),
                 UnSelectedImagePath = "DoorLock/NormallyOpen.png",
@@ -492,7 +496,7 @@
                 Height = Application.GetRealHeight(138),
                 Y = Application.GetRealHeight(1100),
                 BackgroundColor = ZigbeeColor.Current.XMBlack,
-                Radius = 6,
+                Radius = (uint)Application.GetRealHeight(17),
             };
             midTopFrameLayout.AddChidren(btnCurrentFrameLayout);
             #endregion
@@ -500,8 +504,8 @@
             #region 褰撳墠鎴块棿
             var btnCurrentRoomPic = new Button()
             {
-                Width = Application.GetMinReal(81),
-                Height = Application.GetMinReal(81),
+                Width = Application.GetMinRealAverage(81),
+                Height = Application.GetMinRealAverage(81),
                 X = Application.GetRealWidth(58),
                 Y = Application.GetRealHeight(29),
                 UnSelectedImagePath = "DoorLock/RoomPic.png",
@@ -512,7 +516,7 @@
             {
                 Width = Application.GetRealWidth(172),
                 Height = Application.GetRealHeight(49),
-                X = Application.GetRealWidth(150),
+                X = btnCurrentRoomPic.Right + Application.GetRealWidth(12),
                 Y = Application.GetRealHeight(46),
                 Text = currentRoom.Name,
                 TextColor = Shared.Common.ZigbeeColor.Current.XMWhite,
@@ -520,7 +524,7 @@
                 TextAlignment = TextAlignment.CenterLeft,
             };
             btnCurrentFrameLayout.AddChidren(btnCurrentRoomName);
-            #endregion 
+            #endregion
         }
 
         #region 闊抽噺寮圭獥
@@ -546,8 +550,8 @@
 
             var progressBackground = new FrameLayout()
             {
-                Width = Application.GetRealWidth(271),
-                Height = Application.GetRealHeight(700),
+                Width = Application.GetMinRealAverage(271),
+                Height = Application.GetMinRealAverage(700),
                 X = Application.GetRealWidth(403),
                 Y = Application.GetRealHeight(582),
                 BackgroundImagePath = "DoorLock/ProgressBackground.png",
@@ -566,8 +570,8 @@
 
             diyImageVerticalSeekBar = new DiyImageVerticalSeekBar()
             {
-                Width = Application.GetRealWidth(271),
-                Height = Application.GetRealHeight(447 + 63),
+                Width = Application.GetMinRealAverage(271),
+                Height = Application.GetMinRealAverage(447 + 63),
                 Y = Application.GetRealHeight(155),
                 IsProgressTextShow = false,//鏄剧ず鐧惧垎姣�
                 ProgressBarColor = ZigbeeColor.Current.XMProgressBarColor,//閫変腑杩涘害鏉¢鑹�
@@ -611,7 +615,7 @@
                     if (tempDoor.doorLockOperatingEventNotificationCommand != null)
                     {
                         //闈炰富浜轰笉寮硅繖涓獥鍙�
-                        if (HdlUserCenterResourse.ResidenceOption.AuthorityNo != 1)
+                        if (UserCenterResourse.UserInfo.AuthorityNo != 1)
                         {
                             return;
                         }
@@ -732,8 +736,8 @@
                         {
                             var listDevice = new List<CommonDevice> { };
                             listDevice.Add(doorLock);
-                            var devTemp = HdlDeviceCommonLogic.Current.GetMyDeviceEnumInfo(listDevice);
-                            if (devTemp.ConcreteType == DeviceConcreteType.IntelligentLocks_Sone)
+                            var devTemp = Common.LocalDevice.Current.GetMyDeviceEnumInfo(listDevice);
+                            if (devTemp.ConcreteType != DeviceConcreteType.IntelligentLocks_H06C)
                             {
                                 Application.RunOnMainThread(() =>
                                 {
@@ -789,7 +793,7 @@
         public void ClickHandle()
         {
             //闂ㄩ攣鏍囬
-            btnDoorLockTitle.Text = HdlDeviceCommonLogic.Current.GetDeviceMacName(doorLock);
+            btnDoorLockTitle.Text = Common.LocalDevice.Current.GetDeviceMacName(doorLock);
 
             //杩斿洖
             EventHandler<MouseEventArgs> eHandlerBack = (sender, e) =>
@@ -1054,13 +1058,13 @@
         /// </summary>
         private async void NomallyOpenDialog()
         {
-            if (HdlUserCenterResourse.ResidenceOption.AuthorityNo != 1)
+            if (UserCenterResourse.UserInfo.AuthorityNo != 1)
             {
                 this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.OnlyMasterOperate));
                 return;
             }
 
-            if (!HdlUserCenterResourse.AccountOption.DoorUnLockByRemote)
+            if (!UserCenterResourse.AccountOption.DoorUnLockByRemote)
             {
                 SystemSecondAuthentication();
                 return;
@@ -1080,7 +1084,7 @@
                 Common.Logic.LogicDviceList.Clear();
                 if (Common.Logic.LogicDviceList.Count == 0)
                 {
-                    Common.Logic.LogicDviceList.AddRange(HdlDeviceCommonLogic.Current.listAllDevice.ToArray());
+                    Common.Logic.LogicDviceList.AddRange(LocalDevice.Current.listAllDevice.ToArray());
                 }
                 var addLogicPage = new Shared.Phone.Device.Logic.SoneLogicList();
                 UserView.HomePage.Instance.AddChidren(addLogicPage);
@@ -1149,7 +1153,7 @@
         {
             openFrameLayout.Enable = false;
             btnDoorOpenPic.Enable = false;
-            if (HdlUserCenterResourse.ResidenceOption.AuthorityNo != 1)
+            if (UserCenterResourse.UserInfo.AuthorityNo != 1)
             {
                 var result = await DoorLockCommonInfo.GetDoorLockOperateAccess(doorLock, Shared.Common.Config.Instance.Guid);
                 if (result == false)

--
Gitblit v1.8.0