| | |
| | | public FrameLayout midFrameLayout = new FrameLayout { Height = Application.GetRealHeight(1921 - 184), BackgroundColor = ZigbeeColor.Current.XMMidFrameLayout }; |
| | | #region ◆ 底部有圆角布局__________________________ |
| | | public FrameLayout shadowRadiusFrameLayout = new FrameLayout { BackgroundColor = 0x0f000000 }; |
| | | |
| | | |
| | | public FrameLayout bottomRadiusFrameLayout = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(906), |
| | |
| | | /// </summary> |
| | | /// <param name="frameLayout"></param> |
| | | public void BottomRadiusFrameLayout(FrameLayout frameLayout) |
| | | { |
| | | { |
| | | this.shadowRadiusFrameLayout.AddChidren(this.bottomRadiusFrameLayout); |
| | | this.bottomRadiusFrameLayout.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight); |
| | | this.bottomRadiusFrameLayout.AddChidren(btnCancel); |
| | |
| | | } |
| | | if (!UserCenterResourse.Option.DoorUnLockByRemote) |
| | | { |
| | | var dialog2 = new Dialog { }; |
| | | var doorDialog2 = new Shared.Phone.UserCenter.DoorLock.DoorlockDialog(dialog2, Language.StringByID(R.MyInternationalizationString.Tip)); |
| | | doorDialog2.Show(); |
| | | doorDialog2.dialogMidFraFrameLayout.Width = Application.GetRealWidth(674); |
| | | doorDialog2.dialogMidFraFrameLayout.Height = Application.GetRealHeight(115); |
| | | doorDialog2.dialogMidFraFrameLayout.X = Application.GetRealWidth(60); |
| | | doorDialog2.dialogMidFraFrameLayout.Y = Application.GetRealHeight(167); |
| | | doorDialog2.dialogBtnConfirm.Text = Language.StringByID(R.MyInternationalizationString.GoSetting); |
| | | var midText1 = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(674), |
| | | Height = Application.GetRealHeight(115 / 2), |
| | | TextSize = 14, |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextID = R.MyInternationalizationString.RemoteUnlockBindSucessTip1, |
| | | }; |
| | | doorDialog2.dialogMidFraFrameLayout.AddChidren(midText1); |
| | | var midText2 = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(674), |
| | | Height = Application.GetRealHeight(115 / 2), |
| | | Y = Application.GetRealHeight(115 / 2), |
| | | TextSize = 14, |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextID = R.MyInternationalizationString.RemoteUnlockBindSucessTip2, |
| | | }; |
| | | doorDialog2.dialogMidFraFrameLayout.AddChidren(midText2); |
| | | |
| | | doorDialog2.dialogBtnCancel.MouseUpEventHandler += (sender2, e2) => |
| | | { |
| | | dialog2.Close(); |
| | | }; |
| | | doorDialog2.dialogBtnConfirm.MouseUpEventHandler += async (sender2, e2) => |
| | | string msg = Language.StringByID(R.MyInternationalizationString.RemoteUnlockBindSucessTip).Replace("{0}", "\r\n"); |
| | | var alert = new Shared.Phone.UserCenter.ShowMsgControl(ShowMsgType.Confirm, msg, Language.StringByID(R.MyInternationalizationString.GoSetting)); |
| | | alert.Show(); |
| | | //使用确认型弹框时,的回调函数 |
| | | alert.ConfirmClickEvent += () => |
| | | { |
| | | var form = new UserCenter.UserMain.SecondAuthenticationForm(); |
| | | form.AddForm(); |
| | | dialog2.Close(); |
| | | }; |
| | | form.AddForm(); |
| | | }; |
| | | } |
| | | doorLock.ReSave(); |
| | | } |
| | |
| | | /// <param name="action">二次验证的结果成功后的通知</param> |
| | | public static void SecurityRequest(ZigBee.Device.DoorLock doorLock, Action action) |
| | | { |
| | | var dialog2 = new Dialog { }; |
| | | var doorDialog2 = new Shared.Phone.UserCenter.DoorLock.DoorlockDialog(dialog2, Language.StringByID(R.MyInternationalizationString.Tip)); |
| | | doorDialog2.Show(); |
| | | doorDialog2.dialogMidFraFrameLayout.Width = Application.GetRealWidth(674); |
| | | doorDialog2.dialogMidFraFrameLayout.Height = Application.GetRealHeight(115); |
| | | doorDialog2.dialogMidFraFrameLayout.X = Application.GetRealWidth(60); |
| | | doorDialog2.dialogMidFraFrameLayout.Y = Application.GetRealHeight(167); |
| | | doorDialog2.dialogBtnConfirm.Text = Language.StringByID(R.MyInternationalizationString.GoSetting); |
| | | var midText1 = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(674), |
| | | Height = Application.GetRealHeight(115 / 2), |
| | | TextSize = 14, |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextID = R.MyInternationalizationString.GoPersonalCenter, |
| | | }; |
| | | doorDialog2.dialogMidFraFrameLayout.AddChidren(midText1); |
| | | var midText2 = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(674), |
| | | Height = Application.GetRealHeight(115 / 2), |
| | | Y = Application.GetRealHeight(115 / 2), |
| | | TextSize = 14, |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextID = R.MyInternationalizationString.OpenRemoteVerification, |
| | | }; |
| | | doorDialog2.dialogMidFraFrameLayout.AddChidren(midText2); |
| | | |
| | | doorDialog2.dialogBtnCancel.MouseUpEventHandler += (sender2, e2) => |
| | | { |
| | | dialog2.Close(); |
| | | }; |
| | | doorDialog2.dialogBtnConfirm.MouseUpEventHandler += async (sender2, e2) => |
| | | string msg = Language.StringByID(R.MyInternationalizationString.GoPersonalCenter).Replace("{0}", "\r\n"); |
| | | var alert = new Shared.Phone.UserCenter.ShowMsgControl(ShowMsgType.Confirm, msg, Language.StringByID(R.MyInternationalizationString.GoSetting)); |
| | | alert.Show(); |
| | | //使用确认型弹框时,的回调函数 |
| | | alert.ConfirmClickEvent += () => |
| | | { |
| | | var form = new UserCenter.UserMain.SecondAuthenticationForm(); |
| | | form.AddForm(); |
| | | dialog2.Close(); |
| | | }; |
| | | }; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | if (doorLock.RemoteUnlockPassword == "") |
| | | { |
| | | var dialog = new Dialog { }; |
| | | var doorDialog = new Shared.Phone.UserCenter.DoorLock.DoorlockDialog(dialog, Language.StringByID(R.MyInternationalizationString.Tip)); |
| | | doorDialog.Show(); |
| | | doorDialog.dialogMidFraFrameLayout.Height = Application.GetRealHeight(58); |
| | | doorDialog.dialogMidFraFrameLayout.X = Application.GetRealWidth(0); |
| | | doorDialog.dialogMidFraFrameLayout.Y = Application.GetRealHeight(202); |
| | | doorDialog.dialogMidFraFrameLayout.AddChidren(doorDialog.dialogMidText); |
| | | doorDialog.dialogMidText.Text = Language.StringByID(R.MyInternationalizationString.BindRemoteUnlockDoorlock); |
| | | doorDialog.dialogMidFraFrameLayout.AddChidren(doorDialog.dialogMidText); |
| | | doorDialog.dialogBtnConfirm.Text = Language.StringByID(R.MyInternationalizationString.GoSetting); |
| | | doorDialog.dialogBtnCancel.MouseUpEventHandler += (sender1, e1) => |
| | | { |
| | | dialog.Close(); |
| | | }; |
| | | doorDialog.dialogBtnConfirm.MouseUpEventHandler += (sender1, e1) => |
| | | string msgRemoteUnlockRequest = Language.StringByID(R.MyInternationalizationString.BindRemoteUnlockDoorlock); |
| | | var alertRemoteUnlockRequest = new Shared.Phone.UserCenter.ShowMsgControl(ShowMsgType.Confirm, msgRemoteUnlockRequest, Language.StringByID(R.MyInternationalizationString.GoSetting)); |
| | | alertRemoteUnlockRequest.Show(); |
| | | //使用确认型弹框时,的回调函数 |
| | | alertRemoteUnlockRequest.ConfirmClickEvent += () => |
| | | { |
| | | if (UserCenterResourse.UserInfo.AuthorityNo == 1) |
| | | { |
| | |
| | | } |
| | | } |
| | | }; |
| | | dialog.Close(); |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | } |
| | | }; |
| | | dialog.Close(); |
| | | } |
| | | }; |
| | | return; |
| | |
| | | |
| | | if (!UserCenterResourse.Option.DoorUnLockByRemote) |
| | | { |
| | | var dialog2 = new Dialog { }; |
| | | var doorDialog2 = new Shared.Phone.UserCenter.DoorLock.DoorlockDialog(dialog2, Language.StringByID(R.MyInternationalizationString.Tip)); |
| | | doorDialog2.Show(); |
| | | doorDialog2.dialogMidFraFrameLayout.Width = Application.GetRealWidth(674); |
| | | doorDialog2.dialogMidFraFrameLayout.Height = Application.GetRealHeight(115); |
| | | doorDialog2.dialogMidFraFrameLayout.X = Application.GetRealWidth(60); |
| | | doorDialog2.dialogMidFraFrameLayout.Y = Application.GetRealHeight(167); |
| | | doorDialog2.dialogBtnConfirm.Text = Language.StringByID(R.MyInternationalizationString.GoSetting); |
| | | var midText1 = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(674), |
| | | Height = Application.GetRealHeight(115 / 2), |
| | | TextSize = 14, |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextID = R.MyInternationalizationString.GoPersonalCenter, |
| | | }; |
| | | doorDialog2.dialogMidFraFrameLayout.AddChidren(midText1); |
| | | var midText2 = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(674), |
| | | Height = Application.GetRealHeight(115 / 2), |
| | | Y = Application.GetRealHeight(115 / 2), |
| | | TextSize = 14, |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextID = R.MyInternationalizationString.OpenRemoteVerification, |
| | | }; |
| | | doorDialog2.dialogMidFraFrameLayout.AddChidren(midText2); |
| | | |
| | | doorDialog2.dialogBtnCancel.MouseUpEventHandler += (sender2, e2) => |
| | | { |
| | | dialog2.Close(); |
| | | }; |
| | | doorDialog2.dialogBtnConfirm.MouseUpEventHandler += async (sender2, e2) => |
| | | string msgDoorUnLockByRemote = Language.StringByID(R.MyInternationalizationString.GoPersonalCenter).Replace("{0}", "\r\n"); |
| | | var alertDoorUnLockByRemote = new Shared.Phone.UserCenter.ShowMsgControl(ShowMsgType.Confirm, msgDoorUnLockByRemote, Language.StringByID(R.MyInternationalizationString.GoSetting)); |
| | | alertDoorUnLockByRemote.Show(); |
| | | //使用确认型弹框时,的回调函数 |
| | | alertDoorUnLockByRemote.ConfirmClickEvent += () => |
| | | { |
| | | var form = new UserCenter.UserMain.SecondAuthenticationForm(); |
| | | form.AddForm(); |
| | | dialog2.Close(); |
| | | }; |
| | | }; |
| | | return; |
| | | } |
| | | |
| | | var dialog3 = new Dialog { }; |
| | | var doorDialog3 = new Shared.Phone.UserCenter.DoorLock.DoorlockDialog(dialog3, Language.StringByID(R.MyInternationalizationString.UnlockRequest)); |
| | | doorDialog3.Show(); |
| | | doorDialog3.dialogMidFraFrameLayout.Height = Application.GetRealHeight(58); |
| | | doorDialog3.dialogMidFraFrameLayout.X = Application.GetRealWidth(0); |
| | | doorDialog3.dialogMidFraFrameLayout.Y = Application.GetRealHeight(202); |
| | | doorDialog3.dialogMidFraFrameLayout.AddChidren(doorDialog3.dialogMidText); |
| | | doorDialog3.dialogMidText.Text = Language.StringByID(R.MyInternationalizationString.SureToOpenDoorLock); |
| | | doorDialog3.dialogMidText.TextAlignment = TextAlignment.Center; |
| | | doorDialog3.dialogMidFraFrameLayout.AddChidren(doorDialog3.dialogMidText); |
| | | doorDialog3.dialogBtnConfirm.Text = Language.StringByID(R.MyInternationalizationString.DoorlockConfirm); |
| | | doorDialog3.dialogBtnCancel.MouseUpEventHandler += (sender1, e1) => |
| | | { |
| | | dialog3.Close(); |
| | | }; |
| | | doorDialog3.dialogBtnConfirm.MouseUpEventHandler += (sender1, e1) => |
| | | string msg = Language.StringByID(R.MyInternationalizationString.SureToOpenDoorLock); |
| | | var alert = new Shared.Phone.UserCenter.ShowMsgControl(ShowMsgType.Confirm, msg, Language.StringByID(R.MyInternationalizationString.DoorlockConfirm)); |
| | | alert.Show(); |
| | | //使用确认型弹框时,的回调函数 |
| | | alert.ConfirmClickEvent += () => |
| | | { |
| | | action = () => |
| | | { |
| | |
| | | if (btnStatus != null) |
| | | { |
| | | btnStatus.Text = Language.StringByID(R.MyInternationalizationString.DoorLockOpen); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.UnlockSuccess), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show((View)sender1); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.UnlockSuccess), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show(CommonPage.Instance); |
| | | } |
| | | }); |
| | | System.Threading.Thread.Sleep(5000); |
| | |
| | | { |
| | | btnStatus.Text = Language.StringByID(R.MyInternationalizationString.CLose); |
| | | } |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.UnlockFailed), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show((View)sender1); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.UnlockFailed), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show(CommonPage.Instance); |
| | | }); |
| | | } |
| | | } |
| | |
| | | { |
| | | btnStatus.Text = Language.StringByID(R.MyInternationalizationString.CLose); |
| | | } |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.UnlockFailed), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show((View)sender1); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.UnlockFailed), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show(CommonPage.Instance); |
| | | }); |
| | | } |
| | | else |
| | |
| | | { |
| | | btnStatus.Text = Language.StringByID(R.MyInternationalizationString.CLose); |
| | | } |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.DoorlockPasswordDispear), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show((View)sender1); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.DoorlockPasswordDispear), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show(CommonPage.Instance); |
| | | CommonPage.Loading.Hide(); |
| | | doorLock.RemoteUnlockPassword = ""; |
| | | dialog3.Close(); |
| | | if (UserCenterResourse.UserInfo.AuthorityNo == 1) |
| | | { |
| | | var functionSetting = new Shared.Phone.UserCenter.DoorLock.FunctionSetting(doorLock); |
| | |
| | | { |
| | | btnStatus.Text = Language.StringByID(R.MyInternationalizationString.CLose); |
| | | } |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show((View)sender1); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show(CommonPage.Instance); |
| | | }); |
| | | } |
| | | } |
| | |
| | | }); |
| | | }; |
| | | HdlCheckLogic.Current.CheckSecondarySecurity(action); |
| | | dialog3.Close(); |
| | | }; |
| | | }; |
| | | } |
| | | // 获取到到名称更改回调通知 |
| | | public Action<string> devicNameSecAction; |