| | |
| | | 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) =>
|
| | | {
|