| | |
| | | Y = Application.GetRealHeight(98), |
| | | UnSelectedImagePath = "DoorLock/Left.png", |
| | | }; |
| | | |
| | | /// <summary> |
| | | /// 标题返回按键 |
| | | /// </summary> |
| | | public Button btnTip = new Button |
| | | { |
| | | Gravity = Gravity.Center, |
| | | }; |
| | | |
| | | |
| | | /// <summary> |
| | | /// 标题下线 |
| | | /// </summary> |
| | |
| | | }; |
| | | titleFrameLayout.AddChidren(title); |
| | | btnBackFrameLayout.AddChidren(btnBack); |
| | | this.midFrameLayout.AddChidren(this.btnTip); |
| | | //this.midFrameLayout.AddChidren(this.btnTip); |
| | | } |
| | | /// <summary> |
| | | /// 门锁中部布局 |
| | |
| | | System.Threading.Thread.Sleep(500); |
| | | doorLock.RemoteUnlockPassword = editInputPassword.Text; |
| | | ZigBee.Device.DoorLock.minValue = DateTime.MinValue; |
| | | ZigBee.Device.DoorLock.failedCount = 3; |
| | | ZigBee.Device.DoorLock.RemoteUnlockCount = 5; |
| | | oldTime = DateTime.MaxValue; |
| | | CommonPage.Loading.Hide(); |
| | |
| | | btnNext.IsSelected = false; |
| | | } |
| | | dialog.Close(); |
| | | }; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 安全验证 |
| | | /// </summary> |
| | | /// <param name="doorLock">门锁设备</param> |
| | | /// <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) => |
| | | { |
| | | var form = new UserCenter.UserMain.SecondAuthenticationForm(); |
| | | form.AddForm(); |
| | | dialog2.Close(); |
| | | }; |
| | | } |
| | | |
| | |
| | | { |
| | | if (remoteControlResult.responseData.status == 0) |
| | | { |
| | | ZigBee.Device.DoorLock.failedCount = 3; |
| | | if (progressButton != null) |
| | | { |
| | | progressButton.Y = Application.GetRealHeight(347); |
| | |
| | | { |
| | | btnDoorLockPic.IsSelected = false; |
| | | } |
| | | if (btnStatus != null) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | 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); |
| | | }); |
| | | } |
| | | |
| | | 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); |
| | | //Application.RunOnMainThread(() => |
| | | //{ |
| | | // 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); |
| | | // } |
| | | //}); |
| | | System.Threading.Thread.Sleep(5000); |
| | | } |
| | | else |
| | |
| | | { |
| | | 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((View)sender1); |
| | | } |
| | | } |
| | | else if (remoteControlResult != null && remoteControlResult.IsPawDispear == true) |
| | | { |
| | | if (progressButton != null) |
| | | ZigBee.Device.DoorLock.failedCount--; |
| | | if (ZigBee.Device.DoorLock.failedCount != 0) |
| | | { |
| | | progressButton.Y = Application.GetRealHeight(347); |
| | | } |
| | | if (btnDoorLockPic != null) |
| | | { |
| | | btnDoorLockPic.IsSelected = false; |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if (btnStatus != null) |
| | | if (progressButton != null) |
| | | { |
| | | btnStatus.Text = Language.StringByID(R.MyInternationalizationString.CLose); |
| | | progressButton.Y = Application.GetRealHeight(347); |
| | | } |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.DoorlockPasswordDispear), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show((View)sender1); |
| | | CommonPage.Loading.Hide(); |
| | | doorLock.RemoteUnlockPassword = ""; |
| | | }); |
| | | dialog3.Close(); |
| | | |
| | | if (UserCenterResourse.UserInfo.AuthorityNo == 1) |
| | | { |
| | | var userDoorLockPage = new Shared.Phone.UserCenter.DoorLock.FunctionSetting(doorLock); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(userDoorLockPage); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
| | | userDoorLockPage.Show(); |
| | | |
| | | if (btnDoorLockPic != null) |
| | | { |
| | | btnDoorLockPic.IsSelected = false; |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if (btnStatus != null) |
| | | { |
| | | 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); |
| | | } |
| | | else |
| | | { |
| | | var userDoorLockPage = new Shared.Phone.UserCenter.DoorLock.FunctionSettingSub(doorLock); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(userDoorLockPage); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
| | | userDoorLockPage.Show(); |
| | | if (progressButton != null) |
| | | { |
| | | progressButton.Y = Application.GetRealHeight(347); |
| | | } |
| | | if (btnDoorLockPic != null) |
| | | { |
| | | btnDoorLockPic.IsSelected = false; |
| | | } |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if (btnStatus != null) |
| | | { |
| | | 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); |
| | | CommonPage.Loading.Hide(); |
| | | doorLock.RemoteUnlockPassword = ""; |
| | | }); |
| | | dialog3.Close(); |
| | | |
| | | if (UserCenterResourse.UserInfo.AuthorityNo == 1) |
| | | { |
| | | var userDoorLockPage = new Shared.Phone.UserCenter.DoorLock.FunctionSetting(doorLock); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(userDoorLockPage); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
| | | userDoorLockPage.Show(); |
| | | |
| | | } |
| | | else |
| | | { |
| | | var userDoorLockPage = new Shared.Phone.UserCenter.DoorLock.FunctionSettingSub(doorLock); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(userDoorLockPage); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
| | | userDoorLockPage.Show(); |
| | | } |
| | | } |
| | | } |
| | | else |