From 7b60238359b94125d591678eff105ae2bf47843f Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期五, 15 十一月 2019 13:16:21 +0800
Subject: [PATCH] 2019.11.15
---
ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSettingSub.cs | 74 ++++++++++++++++++++----------------
1 files changed, 41 insertions(+), 33 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSettingSub.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSettingSub.cs
index 5198645..fe70ffa 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSettingSub.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSettingSub.cs
@@ -27,7 +27,7 @@
/// </summary>
public void Show()
{
- this.TopFrameLayout(this, Language.StringByID(R.MyInternationalizationString.FunctionSetting));
+ this.TopFrameLayout(this, Language.StringByID(R.MyInternationalizationString.DoorLockFunctionSetting));
EventHandler<MouseEventArgs> eHandlerBack = (sender, e) =>
{
@@ -90,7 +90,7 @@
Text = Language.StringByID(R.MyInternationalizationString.InformationEdit),
TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
TextAlignment = TextAlignment.CenterLeft,
- TextSize = 12,
+ TextSize = 15,
};
bottomFrameLayout2.AddChidren(informationEdit);
@@ -109,7 +109,7 @@
X = Application.GetRealWidth(58),
TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
TextAlignment = TextAlignment.CenterLeft,
- TextSize = 12,
+ TextSize = 14,
};
bottomRowLayout.AddChidren(btnName);
@@ -132,7 +132,7 @@
var btnLine = new FrameLayout()
{
Width = Application.GetRealWidth(965),
- Height = Application.GetRealHeight(2),
+ Height = 1,
X = Application.GetRealWidth(58),
BackgroundColor = Shared.Common.ZigbeeColor.Current.XMRowLine,
Visible = false,
@@ -188,7 +188,7 @@
}
else if (i == 3)
{
- bottomRowLayout.Y = Application.GetRealHeight(723 + 35);
+ bottomRowLayout.Y = Application.GetRealHeight(585 + 35);
btnNext.X = Application.GetRealWidth(0);
btnName.Text = Language.StringByID(R.MyInternationalizationString.RemotelyUnlock);
btnNext.Width = Application.GetRealWidth(104);
@@ -196,8 +196,8 @@
btnNext.UnSelectedImagePath = "DoorLock/Switch.png";
btnNext.SelectedImagePath = "DoorLock/SwitchOn.png";
btnLine.Visible = true;
- btnLine.Y = Application.GetRealHeight(853);
- if (ZigBee.Device.DoorLock.RemoteUnlockPassword == "")
+ btnLine.Y = Application.GetRealHeight(714);
+ if (doorLock.RemoteUnlockPassword == "")
{
btnNext.IsSelected = false;
}
@@ -208,32 +208,40 @@
}
int currentIndex = i;
- EventHandler<MouseEventArgs> eHandler = (sender, e) =>
- {
- if (currentIndex == 3)
- {
- //if (doorLock.HasRemoteUnlockAccess[acc.SubAccountDistributedMark] == true)
- //{
-
- //}
- //else
- //{
-
- //}
- btnNext.IsSelected = !btnNext.IsSelected;
- if (btnNext.IsSelected)
- {
- if (ZigBee.Device.DoorLock.RemoteUnlockPassword == "")
- {
- RemotePasswordDialog(doorLock, btnNext);
- }
- }
- else
- {
- ZigBee.Device.DoorLock.RemoteUnlockPassword = "";
- }
- }
- };
+ EventHandler<MouseEventArgs> eHandler = async (sender, e) =>
+ {
+ if (currentIndex == 3)
+ {
+ 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)
+ {
+ btnNext.IsSelected = !btnNext.IsSelected;
+ if (btnNext.IsSelected)
+ {
+ if (doorLock.RemoteUnlockPassword == "")
+ {
+ RemotePasswordDialog(doorLock, btnNext);
+ }
+ }
+ else
+ {
+ doorLock.RemoteUnlockPassword = "";
+ }
+ }
+ else
+ {
+ new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.NoAccess), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+ }
+ }
+ else
+ {
+ new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.AccountIsFreezed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip);
+ }
+ }
+ };
bottomRowLayout.MouseDownEventHandler += eHandler;
btnNext.MouseDownEventHandler += eHandler;
btnName.MouseDownEventHandler += eHandler;
--
Gitblit v1.8.0