From fdc47d950498e088260a3b04028703adc0f878e0 Mon Sep 17 00:00:00 2001
From: WJC <wjc@hdlchina.com.cn>
Date: 星期一, 30 三月 2020 10:54:27 +0800
Subject: [PATCH] 2020-03-30-1
---
ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs | 127 +++++++++++++++++++++++++++++++++++------
1 files changed, 107 insertions(+), 20 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs
index 44d8fc4..06ff44c 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/SecondAuthenticationForm.cs
@@ -23,6 +23,13 @@
//璁剧疆澶撮儴淇℃伅
base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uSecondAuthentication));
+ var btntitle = (Button)topFrameLayout.GetTagByKey("txtTitle");
+ btntitle.MouseLongEventHandler += (sender, e) =>
+ {
+ //鏄剧ず鏁板瓧鍛戒护绐楀彛
+ this.ShowKeyNumberComandDialog();
+ };
+
//鍒濆鍖栦腑閮ㄤ俊鎭�
this.InitMiddleFrame();
}
@@ -55,7 +62,7 @@
rowFinger.AddChidren(btnEffect, ChidrenBindMode.NotBind);
//寮�鍏虫寜閽�
var btnFingerSwicth = rowFinger.AddMostRightSwitchIcon();
- btnFingerSwicth.IsSelected = UserCenterResourse.Option.FingerprintAuthentication;
+ btnFingerSwicth.IsSelected = UserCenterResourse.AccountOption.FingerprintAuthentication;
//搴曠嚎
rowFinger.AddBottomLine();
@@ -67,7 +74,7 @@
rowPsw.AddRightArrow();
//鍘昏缃�
var btnSettion1 = rowPsw.AddMostRightView(Language.StringByID(R.MyInternationalizationString.uGotoSettion), 400);
- if (string.IsNullOrEmpty(UserCenterResourse.Option.PswAuthentication) == false)
+ if (string.IsNullOrEmpty(UserCenterResourse.AccountOption.PswAuthentication) == false)
{
//鍘讳慨鏀�
btnSettion1.TextID = R.MyInternationalizationString.uGotoEditor;
@@ -83,20 +90,25 @@
rowGesture.AddRightArrow();
//鍘昏缃�
var btnSettion2 = rowGesture.AddMostRightView(Language.StringByID(R.MyInternationalizationString.uGotoSettion), 400);
- if (string.IsNullOrEmpty(UserCenterResourse.Option.GestureAuthentication) == false)
+ if (string.IsNullOrEmpty(UserCenterResourse.AccountOption.GestureAuthentication) == false)
{
//鍘讳慨鏀�
btnSettion2.TextID = R.MyInternationalizationString.uGotoEditor;
}
//浜屾瀹夊叏楠岃瘉灏嗙敤浜庝笅鍒楁搷浣�
- var btnTitle = new NormalViewControl(800, 49, true);
+ var btnTitle = new NormalViewControl(800, 50, true);
btnTitle.X = ControlCommonResourse.XXLeft;
- btnTitle.Y = frameTop.Bottom + Application.GetRealHeight(35);
+ btnTitle.Y = frameTop.Bottom + Application.GetRealHeight(34);
btnTitle.TextSize = 12;
btnTitle.TextColor = UserCenterColor.Current.TextGrayColor3;
btnTitle.TextID = R.MyInternationalizationString.uSecondarySecurityWillBeUsedForTheFollowingOperations;
bodyFrameLayout.AddChidren(btnTitle);
+ btnTitle.ButtonClickEvent += (sender, e) =>
+ {
+ //闅愬尶鍔熻兘鐐瑰嚮
+ this.HideOptionClick(btnTitle);
+ };
var frameButtom = new FrameListControl(12);
frameButtom.Y = btnTitle.Bottom + Application.GetRealHeight(23);
@@ -133,7 +145,7 @@
var btnLockSwicth = rowLock.AddMostRightSwitchIcon();
//搴曠嚎
rowLock.AddBottomLine();
- btnLockSwicth.IsSelected = UserCenterResourse.Option.DoorUnLockByRemote;
+ btnLockSwicth.IsSelected = UserCenterResourse.AccountOption.DoorUnLockByRemote;
var rowSafety = new FrameRowControl(frameButtom.rowSpace / 2);
rowSafety.UseClickStatu = false;
@@ -184,7 +196,7 @@
rowPsw.ButtonClickEvent += (sender, e) =>
{
//濡傛灉娌℃湁瀵嗙爜楠岃瘉
- if (string.IsNullOrEmpty(UserCenterResourse.Option.PswAuthentication) == true)
+ if (string.IsNullOrEmpty(UserCenterResourse.AccountOption.PswAuthentication) == true)
{
//濡傛灉璁剧疆鏈夊叾浠栭獙璇佹柟寮�,鍒欓渶瑕侀獙璇�,鍚﹀垯鐩存帴璺宠繃楠岃瘉
HdlCheckLogic.Current.CheckSecondarySecurity(
@@ -201,7 +213,7 @@
rowGesture.ButtonClickEvent += (sender, e) =>
{
//濡傛灉娌℃湁鎵嬪娍楠岃瘉
- if (string.IsNullOrEmpty(UserCenterResourse.Option.GestureAuthentication) == true)
+ if (string.IsNullOrEmpty(UserCenterResourse.AccountOption.GestureAuthentication) == true)
{
//濡傛灉璁剧疆鏈夊叾浠栭獙璇佹柟寮�,鍒欓渶瑕侀獙璇�,鍚﹀垯鐩存帴璺宠繃楠岃瘉
HdlCheckLogic.Current.CheckSecondarySecurity(
@@ -251,22 +263,22 @@
return;
}
- UserCenterResourse.Option.FingerprintAuthentication = !btnFingerSwicth.IsSelected;
- UserCenterResourse.Option.Save();
+ UserCenterResourse.AccountOption.FingerprintAuthentication = !btnFingerSwicth.IsSelected;
+ UserCenterResourse.AccountOption.Save();
//閲嶆柊鍒锋柊鐣岄潰
this.InitMiddleFrame();
}
else
{
- if (string.IsNullOrEmpty(UserCenterResourse.Option.GestureAuthentication) == true
- && string.IsNullOrEmpty(UserCenterResourse.Option.PswAuthentication) == true
+ if (string.IsNullOrEmpty(UserCenterResourse.AccountOption.GestureAuthentication) == true
+ && string.IsNullOrEmpty(UserCenterResourse.AccountOption.PswAuthentication) == true
&& btnLockSwicth.IsSelected == true)
{
//鎵�鏈夐獙璇侀兘鍙栨秷浜�,鍒欏彇娑堣繙绋嬪紑閿佸姛鑳�
- UserCenterResourse.Option.DoorUnLockByRemote = false;
+ UserCenterResourse.AccountOption.DoorUnLockByRemote = false;
}
- UserCenterResourse.Option.FingerprintAuthentication = !btnFingerSwicth.IsSelected;
- UserCenterResourse.Option.Save();
+ UserCenterResourse.AccountOption.FingerprintAuthentication = !btnFingerSwicth.IsSelected;
+ UserCenterResourse.AccountOption.Save();
//閲嶆柊鍒锋柊鐣岄潰
this.InitMiddleFrame();
}
@@ -283,11 +295,11 @@
private void DoRemoteUnLocks(MostRightIconControl btnLockSwicth)
{
if (btnLockSwicth.IsSelected == false
- && string.IsNullOrEmpty(UserCenterResourse.Option.GestureAuthentication) == true
- && string.IsNullOrEmpty(UserCenterResourse.Option.PswAuthentication) == true)
+ && string.IsNullOrEmpty(UserCenterResourse.AccountOption.GestureAuthentication) == true
+ && string.IsNullOrEmpty(UserCenterResourse.AccountOption.PswAuthentication) == true)
{
TouchIDUtils.TouchIDSupperType type = TouchIDUtils.getTouchIDSupperType();
- if (type == TouchIDUtils.TouchIDSupperType.None || UserCenterResourse.Option.FingerprintAuthentication == false)
+ if (type == TouchIDUtils.TouchIDSupperType.None || UserCenterResourse.AccountOption.FingerprintAuthentication == false)
{
//杩滅▼寮�閿佸紑鍚け璐ワ紝璇峰厛璁剧疆{0}浜屾瀹夊叏楠岃瘉鏂瑰紡
string msg = Language.StringByID(R.MyInternationalizationString.uUseUnLockByRemoteFailMsg);
@@ -299,8 +311,8 @@
return;
}
}
- UserCenterResourse.Option.DoorUnLockByRemote = !btnLockSwicth.IsSelected;
- UserCenterResourse.Option.Save();
+ UserCenterResourse.AccountOption.DoorUnLockByRemote = !btnLockSwicth.IsSelected;
+ UserCenterResourse.AccountOption.Save();
//閲嶆柊鍒锋柊鐣岄潰
this.InitMiddleFrame();
}
@@ -321,5 +333,80 @@
}
#endregion
+
+ #region 鈻� 闅愬尶鍔熻兘___________________________
+
+ /// <summary>
+ /// 鐐瑰嚮鍚堣
+ /// </summary>
+ private int clickCount = 0;
+ /// <summary>
+ /// 鐐瑰嚮鐨勯偅鐬棿鐨勬椂闂�
+ /// </summary>
+ private DateTime clickTime;
+ /// <summary>
+ /// 闅愬尶鍔熻兘
+ /// </summary>
+ private void HideOptionClick(NormalViewControl btnTitle)
+ {
+ if (clickCount == 0)
+ {
+ clickTime = DateTime.Now;
+ }
+ clickCount++;
+ if (clickCount >= 10)
+ {
+ if ((DateTime.Now - clickTime).TotalSeconds > 3)
+ {
+ clickCount = 0;
+ return;
+ }
+ btnTitle.CanClick = false;
+ HdlThreadLogic.Current.RunThread(async () =>
+ {
+ this.ShowProgressBar();
+ var result = await HdlBackupLogic.Current.LoadHideOption();
+ this.CloseProgressBar();
+ if (result == true)
+ {
+ this.ShowMassage(ShowMsgType.Tip, "鍒锋柊闅愬尶閰嶇疆鎴愬姛");
+ }
+ else
+ {
+ this.ShowMassage(ShowMsgType.Tip, "鍒锋柊闅愬尶閰嶇疆澶辫触");
+ }
+ });
+ }
+ }
+
+ /// <summary>
+ /// 鏄剧ず鏁板瓧鍛戒护绐楀彛
+ /// </summary>
+ private void ShowKeyNumberComandDialog()
+ {
+ //鐢熸垚涓�涓脊绐楃敾闈�
+ var dialogForm = new DialogInputControl();
+ dialogForm.SetTitleText("?????");
+
+ //鎸変笅纭鎸夐挳
+ dialogForm.ComfirmClickEvent += ((textValue) =>
+ {
+ dialogForm.CloseDialog();
+ if (textValue == "2887")
+ {
+ //寮�鍚殣钘忚彍鍗�
+ UserCenterResourse.HideOption.CenterHideMenu = 1;
+ this.ShowMassage(ShowMsgType.Tip, "Ok!");
+ }
+ if (textValue == "0001")
+ {
+ var form = new Guide.GuideHouseForm();
+ form.ShowFrom();
+ this.ShowMassage(ShowMsgType.Tip, "Ok!");
+ }
+ });
+ }
+
+ #endregion
}
}
--
Gitblit v1.8.0