From b9cb076fe6127160c96c35bf9c8cebcffe1d5ccd Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期五, 10 一月 2020 17:35:23 +0800 Subject: [PATCH] 2020.1.10 --- ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs | 83 ++++++++++++++++++++++++++--------------- 1 files changed, 53 insertions(+), 30 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs index e9ea991..0f9bbce 100644 --- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs @@ -117,6 +117,7 @@ Height = Application.GetRealHeight(1238), Width = Application.GetRealWidth(965), BackgroundColor = Shared.Common.ZigbeeColor.Current.XMWhite, + Radius = 6, }; this.midFrameLayout.AddChidren(midTopFrameLayout); @@ -126,12 +127,14 @@ Height = Application.GetRealHeight(60), X = Application.GetRealWidth(372), Y = Application.GetRealHeight(46), - TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, - Text = string.IsNullOrEmpty(doorLock.DeviceName) ? Language.StringByID(R.MyInternationalizationString.UNKnown) : doorLock.DeviceName, + TextColor = Shared.Common.ZigbeeColor.Current.XMBlack , TextSize = 15, TextAlignment = TextAlignment.Center, + IsBold =true, }; midTopFrameLayout.AddChidren(btnDoorLockTitle); + //鑾峰彇Mac鍚嶅瓧 + btnDoorLockTitle.Text = Common.LocalDevice.Current.GetDeviceMacName(doorLock); var btnRecord = new Button() { @@ -286,12 +289,22 @@ }; closeFrameLayout.AddChidren(btnDoorClosePic); + var btnCurrentTopFrameLayout = new FrameLayout() + { + Height = Application.GetRealHeight(50), + Width = Application.GetRealWidth(965), + BackgroundColor = ZigbeeColor.Current.XMBlack, + Y = Application.GetRealHeight(1100), + }; + midTopFrameLayout.AddChidren(btnCurrentTopFrameLayout); + var btnCurrentFrameLayout = new FrameLayout() { Width = Application.GetRealWidth(965), Height = Application.GetRealHeight(138), Y = Application.GetRealHeight(1100), BackgroundColor = ZigbeeColor.Current.XMBlack, + Radius = 6, }; midTopFrameLayout.AddChidren(btnCurrentFrameLayout); @@ -320,17 +333,19 @@ #endregion EventHandler<MouseEventArgs> hander1 = async (sender, e) => - { - if (UserCenterResourse.UserInfo.AuthorityNo != 1) - { - var result = await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetDoorLockOperateAccess(doorLock, Shared.Common.Config.Instance.Guid); - if (result == false) - { - var result1 = await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetDoorLockUnlockAccess(doorLock, Shared.Common.Config.Instance.Guid); - if (result1 == true) - { - RemoteUnlockRequest(doorLock, action, progressButton, btnDoorLockPic, btnStatus, btnDoorLockTitle); - devicNameSecAction += (deviceRename) => + { + openFrameLayout.Enable = false; + btnDoorOpenPic.Enable = false; + if (UserCenterResourse.UserInfo.AuthorityNo != 1) + { + var result = await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetDoorLockOperateAccess(doorLock, Shared.Common.Config.Instance.Guid); + if (result == false) + { + var result1 = await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetDoorLockUnlockAccess(doorLock, Shared.Common.Config.Instance.Guid); + if (result1 == true) + { + RemoteUnlockRequest(doorLock, action, progressButton, btnDoorLockPic, btnStatus, btnDoorLockTitle); + devicNameSecAction += (deviceRename) => { if (!string.IsNullOrEmpty(deviceRename)) { @@ -340,21 +355,27 @@ deviceUI.CommonDevice.ReSave(); } }; - } - else - { - new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.NoAccess), Direction = AMPopTipDirection.Down, CloseTime = 1 }.Show(Common.CommonPage.Instance); - } - } - else - { - new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.AccountIsFreezed), Direction = AMPopTipDirection.Down, CloseTime = 1 }.Show(Common.CommonPage.Instance); - } - } - else - { - RemoteUnlockRequest(doorLock, action, progressButton, btnDoorLockPic, btnStatus, btnDoorLockTitle); - devicNameSecAction += (deviceRename) => + openFrameLayout.Enable = true; + btnDoorOpenPic.Enable = true; + } + else + { + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.NoAccess), Direction = AMPopTipDirection.Down, CloseTime = 1 }.Show(Common.CommonPage.Instance); + openFrameLayout.Enable = true; + btnDoorOpenPic.Enable = true; + } + } + else + { + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.AccountIsFreezed), Direction = AMPopTipDirection.Down, CloseTime = 1 }.Show(Common.CommonPage.Instance); + openFrameLayout.Enable = true; + btnDoorOpenPic.Enable = true; + } + } + else + { + RemoteUnlockRequest(doorLock, action, progressButton, btnDoorLockPic, btnStatus, btnDoorLockTitle); + devicNameSecAction += (deviceRename) => { if (!string.IsNullOrEmpty(deviceRename)) { @@ -364,8 +385,10 @@ deviceUI.CommonDevice.ReSave(); } }; - } - }; + openFrameLayout.Enable = true; + btnDoorOpenPic.Enable = true; + } + }; openFrameLayout.MouseUpEventHandler += hander1; btnDoorOpenPic.MouseUpEventHandler += hander1; EventHandler<MouseEventArgs> hander2 = (sender, e) => -- Gitblit v1.8.0