From fcebedf4555b2d597668006ba21ed47630343da3 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期一, 24 八月 2020 14:37:07 +0800
Subject: [PATCH] 2020-08-24-2
---
ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs | 113 +++++++++++++++++++++++++++++++++-----------------------
1 files changed, 66 insertions(+), 47 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs
index c94de76..5043272 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs
@@ -47,27 +47,37 @@
frameTop.BackgroundColor = UserCenterColor.Current.White;
bodyFrameLayout.AddChidren(frameTop);
- var rowFinger = new FrameRowControl(frameTop.rowSpace / 2);
- rowFinger.UseClickStatu = false;
- frameTop.AddChidren(rowFinger);
- //鎸囩汗楠岃瘉
- var btnFinger = rowFinger.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uFingerprintAuthentication), 400, 58);
- btnFinger.Y = Application.GetRealHeight(12) + rowFinger.chidrenYaxis;
- rowFinger.AddChidren(btnFinger, ChidrenBindMode.NotBind);
- //浠呭鏈満鏈夋晥
- var btnEffect= rowFinger.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uOnlyEffectToThisPhone), 400, 40);
- btnEffect.Y = Application.GetRealHeight(72) + rowFinger.chidrenYaxis;
- btnEffect.TextSize = 12;
- btnEffect.TextColor = UserCenterColor.Current.TextGrayColor1;
- rowFinger.AddChidren(btnEffect, ChidrenBindMode.NotBind);
- //寮�鍏虫寜閽�
- var btnFingerSwicth = rowFinger.AddMostRightSwitchIcon();
- btnFingerSwicth.IsSelected = UserCenterResourse.AccountOption.FingerprintAuthentication;
- //搴曠嚎
- rowFinger.AddBottomLine();
+ MostRightIconControl btnFingerSwicth = null;
+ var touchIDSupper = TouchIDUtils.getTouchIDSupperType();
+ if (touchIDSupper == TouchIDUtils.TouchIDSupperType.TouchID)
+ {
+ var rowFinger = new FrameRowControl(frameTop.rowSpace / 2);
+ rowFinger.UseClickStatu = false;
+ frameTop.AddChidren(rowFinger);
+ //鎸囩汗楠岃瘉
+ var btnFinger = rowFinger.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uFingerprintAuthentication), 400, 58);
+ btnFinger.Y = Application.GetRealHeight(12) + rowFinger.chidrenYaxis;
+ rowFinger.AddChidren(btnFinger, ChidrenBindMode.NotBind);
+ //浠呭鏈満鏈夋晥
+ var btnEffect = rowFinger.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uOnlyEffectToThisPhone), 400, 40);
+ btnEffect.Y = Application.GetRealHeight(72) + rowFinger.chidrenYaxis;
+ btnEffect.TextSize = 12;
+ btnEffect.TextColor = UserCenterColor.Current.TextGrayColor1;
+ rowFinger.AddChidren(btnEffect, ChidrenBindMode.NotBind);
+ //寮�鍏虫寜閽�
+ btnFingerSwicth = rowFinger.AddMostRightSwitchIcon();
+ btnFingerSwicth.IsSelected = UserCenterResourse.AccountOption.FingerprintAuthentication;
+ //搴曠嚎
+ rowFinger.AddBottomLine();
+ }
var rowPsw = new FrameRowControl(frameTop.rowSpace / 2);
frameTop.AddChidren(rowPsw);
+ //濡傛灉杩欎釜鎵嬫満涓嶆敮鎸乀ouchId鐨勮瘽,鍒欏鍣ㄥ噺鍘昏繖涓鐨勯珮搴�
+ if (touchIDSupper != TouchIDUtils.TouchIDSupperType.TouchID)
+ {
+ frameTop.Height -= rowPsw.Height;
+ }
//瀵嗙爜楠岃瘉
rowPsw.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uPasswordAuthentication), 400);
//鍙崇澶�
@@ -158,40 +168,43 @@
btnMsg2.TextColor = UserCenterColor.Current.TextGrayColor2;
//鎸囩汗楠岃瘉
- btnFingerSwicth.ButtonClickEvent += (sender, e) =>
+ if (btnFingerSwicth != null)
{
- if (btnFingerSwicth.IsSelected == false)
+ btnFingerSwicth.ButtonClickEvent += (sender, e) =>
{
- TouchIDUtils.TouchIDSupperType type = TouchIDUtils.getTouchIDSupperType();
- if (type == TouchIDUtils.TouchIDSupperType.None)
+ if (btnFingerSwicth.IsSelected == false)
{
- //寮�鍚寚绾归獙璇佸け璐ワ紒璇峰墠寰�鎵嬫満{0}璁剧疆寮�鍚寚绾瑰紑閿侀獙璇�
- string msg = Language.StringByID(R.MyInternationalizationString.uUseFingerprintAuthenticationFailMsg);
- msg = msg.Replace("{0}", "\r\n");
- this.ShowMassage(ShowMsgType.Normal, msg);
- return;
+ TouchIDUtils.TouchIDSupperType type = TouchIDUtils.getTouchIDSupperType();
+ if (type == TouchIDUtils.TouchIDSupperType.None)
+ {
+ //寮�鍚寚绾归獙璇佸け璐ワ紒璇峰墠寰�鎵嬫満{0}璁剧疆寮�鍚寚绾瑰紑閿侀獙璇�
+ string msg = Language.StringByID(R.MyInternationalizationString.uUseFingerprintAuthenticationFailMsg);
+ msg = msg.Replace("{0}", "\r\n");
+ this.ShowMassage(ShowMsgType.Normal, msg);
+ return;
+ }
+ //灏員ouch ID鐢ㄤ簬銆孼igBee銆峽0}鏇存敼瀹夐槻璁剧疆鍜屽紑鍚棬閿佹椂浣跨敤
+ string msg2 = Language.StringByID(R.MyInternationalizationString.uUseFingerprintAuthenticationMsg);
+ msg2 = msg2.Replace("{0}", "\r\n");
+ this.ShowMassage(ShowMsgType.Confirm, msg2, () =>
+ {
+ //濡傛灉璁剧疆鏈夊畨鍏ㄩ獙璇�,鎯宠淇敼瀹�,蹇呴』鍏堥�氳繃瀹夊叏楠岃瘉
+ //濡傛灉娌℃湁璁剧疆鏈夊畨鍏ㄩ獙璇�,鍒欐棤闇�楠岃瘉
+ HdlCheckLogic.Current.CheckSecondarySecurity(
+ () => { this.DoFingerprintAuthentication(btnFingerSwicth, btnLockSwicth); },//澶勭悊鎸囩汗楠岃瘉
+ () => { this.DoFingerprintAuthentication(btnFingerSwicth, btnLockSwicth); });//澶勭悊鎸囩汗楠岃瘉
+ });
}
- //灏員ouch ID鐢ㄤ簬銆孼igBee銆峽0}鏇存敼瀹夐槻璁剧疆鍜屽紑鍚棬閿佹椂浣跨敤
- string msg2 = Language.StringByID(R.MyInternationalizationString.uUseFingerprintAuthenticationMsg);
- msg2 = msg2.Replace("{0}", "\r\n");
- this.ShowMassage(ShowMsgType.Confirm, msg2, () =>
+ else
{
//濡傛灉璁剧疆鏈夊畨鍏ㄩ獙璇�,鎯宠淇敼瀹�,蹇呴』鍏堥�氳繃瀹夊叏楠岃瘉
//濡傛灉娌℃湁璁剧疆鏈夊畨鍏ㄩ獙璇�,鍒欐棤闇�楠岃瘉
HdlCheckLogic.Current.CheckSecondarySecurity(
- () => { this.DoFingerprintAuthentication(btnFingerSwicth, btnLockSwicth); },//澶勭悊鎸囩汗楠岃瘉
- () => { this.DoFingerprintAuthentication(btnFingerSwicth, btnLockSwicth); });//澶勭悊鎸囩汗楠岃瘉
- });
- }
- else
- {
- //濡傛灉璁剧疆鏈夊畨鍏ㄩ獙璇�,鎯宠淇敼瀹�,蹇呴』鍏堥�氳繃瀹夊叏楠岃瘉
- //濡傛灉娌℃湁璁剧疆鏈夊畨鍏ㄩ獙璇�,鍒欐棤闇�楠岃瘉
- HdlCheckLogic.Current.CheckSecondarySecurity(
- () => { this.DoFingerprintAuthentication(btnFingerSwicth, btnLockSwicth); },//澶勭悊鎸囩汗楠岃瘉
- () => { this.DoFingerprintAuthentication(btnFingerSwicth, btnLockSwicth); });//澶勭悊鎸囩汗楠岃瘉
- }
- };
+ () => { this.DoFingerprintAuthentication(btnFingerSwicth, btnLockSwicth); },//澶勭悊鎸囩汗楠岃瘉
+ () => { this.DoFingerprintAuthentication(btnFingerSwicth, btnLockSwicth); });//澶勭悊鎸囩汗楠岃瘉
+ }
+ };
+ }
//瀵嗙爜楠岃瘉
rowPsw.ButtonClickEvent += (sender, e) =>
{
@@ -415,10 +428,10 @@
UserCenterResourse.HideOption.CenterHideMenu = 1;
}
}
- if (textValue == "0001a")
+ if (textValue == "84651666")
{
- var form = new Guide.GuideHouseForm();
- form.ShowFrom();
+ //鏄剧ず璁惧鍘嗗彶鐗堟湰
+ UserCenterResourse.HideOption.DeviceHistory = 1;
}
if (textValue == "12349")
{
@@ -430,6 +443,12 @@
//寮哄埗璺宠浆缃戝叧鐣岄潰
UserCenterResourse.HideOption.GotoGatewayProductInfoForm = 1;
}
+ if (textValue == "abcdef1")
+ {
+ //寮哄埗鍙樻洿甯稿紑妯″紡鐨勬椂闂翠负鍒嗛挓
+ UserCenterResourse.HideOption.DoorLockNomallyOpenTimeMode = 1;
+ }
+
this.ShowMassage(ShowMsgType.Tip, "Ok!");
});
}
--
Gitblit v1.8.0