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/DoorLock/AddUnLockMethod.cs | 109 ++++++++++++++++++++++++++++--------------------------
1 files changed, 57 insertions(+), 52 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/AddUnLockMethod.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/AddUnLockMethod.cs
index 2a6aae0..4195a9e 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/AddUnLockMethod.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/AddUnLockMethod.cs
@@ -3,7 +3,7 @@
namespace Shared.Phone.UserCenter.DoorLock
{
- public class AddUnLockMethod : DoorLockCommonLayout, ZigBee.Common.IStatus
+ public class AddUnLockMethod : DoorLockCommonLayout
{
/// 鏋勯�犲嚱鏁�
/// </summary>
@@ -43,7 +43,7 @@
MidFrameLayoutContent();
}
-
+
/// <summary>
/// 涓儴甯冨眬
/// </summary>
@@ -54,7 +54,8 @@
};
this.midFrameLayout.AddChidren(bodyView);
- for (int i = 0; i < 3; i++)
+ int count = GetSupportType(doorLock);
+ for (int i = 0; i < count; i++)
{
var RowView = new FrameLayout()
{
@@ -71,7 +72,7 @@
TextAlignment = TextAlignment.CenterLeft,
TextColor = Shared.Common.ZigbeeColor.Current.XMBlack,
Gravity = Gravity.CenterVertical,
- TextSize=14,
+ TextSize = 14,
};
RowView.AddChidren(btnText);
@@ -103,82 +104,86 @@
};
RowView.AddChidren(line2);
+ var listDevice = Common.LocalDevice.Current.GetDevicesByMac(doorLock.DeviceAddr);
+ var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(listDevice);
if (i == 0)
{
btnText.TextID = R.MyInternationalizationString.AddPassword;
}
else if (i == 1)
{
- btnText.TextID = R.MyInternationalizationString.AddFingerprint;
+ if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.IntelligentLocks_AT1F)
+ {
+ btnText.TextID = R.MyInternationalizationString.AddDoorLockCalmFingerprint;
+ }
+ else if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.IntelligentLocks_HAT1B)
+ {
+ btnText.TextID = R.MyInternationalizationString.AddDoorLockCalmFingerprint;
+ }
+ else
+ {
+ btnText.TextID = R.MyInternationalizationString.AddFingerprint;
+ }
}
else if (i == 2)
{
- btnText.TextID = R.MyInternationalizationString.AddIcCard;
+ if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.IntelligentLocks_AT1F)
+ {
+ btnText.TextID = R.MyInternationalizationString.AddDoorLockFaceID;
+ }
+ else if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.IntelligentLocks_AT1TF)
+ {
+ btnText.TextID = R.MyInternationalizationString.AddIcCard;
+ }
+ else
+ {
+ btnText.TextID = R.MyInternationalizationString.AddIcCard;
+ }
+ }
+ if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.IntelligentLocks_AT1TF)
+ {
+ if (i == 3)
+ {
+ btnText.TextID = R.MyInternationalizationString.AddDoorLockFaceID;
+ }
+ }
+ if (i == count - 1)
+ {
line2.Visible = false;
}
-
int currentIndex = i;
EventHandler<MouseEventArgs> eHandler = (sender, e) =>
{
+ string unlockTypeStr = "";
if (currentIndex == 0)
{
- var addUnLockMethodTip = new AddUnLockMethodTip(doorLock, curAccountObj, "password");
- Shared.Phone.UserView.HomePage.Instance.AddChidren(addUnLockMethodTip);
- Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
- addUnLockMethodTip.Show();
+ unlockTypeStr = "password";
}
else if (currentIndex == 1)
{
- var addUnLockMethodTip = new AddUnLockMethodTip(doorLock, curAccountObj, "fingerprint");
- Shared.Phone.UserView.HomePage.Instance.AddChidren(addUnLockMethodTip);
- Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
- addUnLockMethodTip.Show();
+ unlockTypeStr = "fingerprint";
}
else if (currentIndex == 2)
{
- var addUnLockMethodTip = new AddUnLockMethodTip(doorLock, curAccountObj, "proximity");
- Shared.Phone.UserView.HomePage.Instance.AddChidren(addUnLockMethodTip);
- Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
- addUnLockMethodTip.Show();
+ unlockTypeStr = "proximity";
}
+ else if (currentIndex == 3)
+ {
+ unlockTypeStr = "faceID";
+ }
+ else if (currentIndex == 4)
+ {
+ unlockTypeStr = "calmFingerprint";
+ }
+ var addUnLockMethodTip = new AddUnLockMethodTip(doorLock, curAccountObj, unlockTypeStr);
+ Shared.Phone.UserView.HomePage.Instance.AddChidren(addUnLockMethodTip);
+ Shared.Phone.UserView.HomePage.Instance.PageIndex += 1;
+ addUnLockMethodTip.Show();
};
btnRight.MouseUpEventHandler += eHandler;
RowView.MouseUpEventHandler += eHandler;
btnText.MouseUpEventHandler += eHandler;
}
}
-
- #region 鎺ュ彛瀹炵幇
- /// <summary>
- /// 澶勭悊鍙樺寲浜嬩欢 --灏嗗純鐢� 鏀圭敤DeviceInfoChange()
- /// </summary>
- /// <returns>The changed.</returns>
- /// <param name="common">Common.</param>
- public void Changed(CommonDevice common)
- {
- }
- /// <summary>
- /// 澶勭悊鍙樺寲浜嬩欢
- /// </summary>
- /// <param name="common"></param>
- /// <param name="typeTag"></param>
- public void DeviceInfoChange(CommonDevice common, string typeTag)
- {
- }
- /// <summary>
- /// Changeds the IL ogic status.
- /// </summary>
- /// <param name="logic">Logic.</param>
- public void ChangedILogicStatus(ZigBee.Device.Logic logic)
- {
- }
- /// <summary>
- /// Changeds the IS cene status.
- /// </summary>
- /// <param name="scene">Scene.</param>
- public void ChangedISceneStatus(Scene scene)
- {
- }
- #endregion
}
}
--
Gitblit v1.8.0