| | |
| | | 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);
|
| | | //如果这个手机不支持TouchId的话,则容器减去这个行的高度
|
| | | if (touchIDSupper != TouchIDUtils.TouchIDSupperType.TouchID)
|
| | | {
|
| | | frameTop.Height -= rowPsw.Height;
|
| | | }
|
| | | //密码验证
|
| | | rowPsw.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uPasswordAuthentication), 400);
|
| | | //右箭头
|
| | |
| | | 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;
|
| | | }
|
| | | //将Touch ID用于「ZigBee」{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); });//处理指纹验证
|
| | | });
|
| | | }
|
| | | //将Touch ID用于「ZigBee」{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) =>
|
| | | {
|
| | |
| | | return;
|
| | | }
|
| | | btnTitle.CanClick = false;
|
| | | HdlThreadLogic.Current.RunThread(async () =>
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | this.ShowProgressBar();
|
| | | var result = await HdlBackupLogic.Current.LoadHideOption();
|
| | | var result = HdlBackupLogic.Current.LoadHideOption();
|
| | | this.CloseProgressBar();
|
| | | if (result == true)
|
| | | {
|
| | |
| | | dialogForm.ComfirmClickEvent += ((textValue) =>
|
| | | {
|
| | | dialogForm.CloseDialog();
|
| | | if (textValue == "2887")
|
| | | if (textValue.StartsWith("2887") == true)
|
| | | {
|
| | | //开启隐藏菜单
|
| | | UserCenterResourse.HideOption.CenterHideMenu = 1;
|
| | | var myTime = DateTime.Now;
|
| | | string strTime1 = myTime.ToString("HHmm");
|
| | | int value1 = Convert.ToInt32(strTime1.Substring(3, 1));
|
| | | string check1 = "2887" + strTime1 + (7 + value1).ToString();
|
| | |
|
| | | myTime = myTime.AddMinutes(-1);
|
| | | string strTime2 = myTime.ToString("HHmm");
|
| | | int value2 = Convert.ToInt32(strTime2.Substring(3, 1));
|
| | | string check2 = "2887" + strTime2 + (7 + value2).ToString();
|
| | |
|
| | | myTime = myTime.AddMinutes(2);
|
| | | string strTime3 = myTime.ToString("HHmm");
|
| | | int value3 = Convert.ToInt32(strTime3.Substring(3, 1));
|
| | | string check3 = "2887" + strTime3 + (7 + value3).ToString();
|
| | |
|
| | | if (textValue == check1 || textValue == check2 || textValue == check3)
|
| | | {
|
| | | //开启隐藏菜单
|
| | | UserCenterResourse.HideOption.CenterHideMenu = 1;
|
| | | }
|
| | | }
|
| | | if (textValue == "0001")
|
| | | if (textValue == "84651666")
|
| | | {
|
| | | var form = new Guide.GuideHouseForm();
|
| | | form.ShowFrom();
|
| | | //显示设备历史版本
|
| | | UserCenterResourse.HideOption.DeviceHistory = 1;
|
| | | }
|
| | | if (textValue == "12349")
|
| | | {
|
| | | //强制跳转真实设备界面
|
| | | UserCenterResourse.HideOption.GotoRealDeviceForm = 1;
|
| | | }
|
| | | if (textValue == "12348")
|
| | | {
|
| | | //强制跳转网关界面
|
| | | UserCenterResourse.HideOption.GotoGatewayProductInfoForm = 1;
|
| | | }
|
| | | if (textValue == "abcdef1")
|
| | | {
|
| | | //强制变更常开模式的时间为分钟
|
| | | UserCenterResourse.HideOption.DoorLockNomallyOpenTimeMode = 1;
|
| | | }
|
| | |
|
| | | this.ShowMassage(ShowMsgType.Tip, "Ok!");
|
| | | });
|
| | | }
|