| | |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = Language.StringByID(R.MyInternationalizationString.ClearTempPassword), |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMTopTitleText, |
| | | TextSize = 12, |
| | | TextSize = 14, |
| | | IsBold = true, |
| | | }; |
| | | delBackgroundFrameLayout.AddChidren(btnDelText); |
| | | |
| | | EventHandler<MouseEventArgs> eHandler2 = (sender2, e2) => |
| | | { |
| | | var dialog1 = new Dialog { }; |
| | | var doorDialog = new Shared.Phone.UserCenter.DoorLock.DoorlockDialog(dialog1, Language.StringByID(R.MyInternationalizationString.Tip)); |
| | | doorDialog.Show(); |
| | | doorDialog.dialogMidFraFrameLayout.Width = Application.GetRealWidth(415); |
| | | doorDialog.dialogMidFraFrameLayout.Height = Application.GetRealHeight(58); |
| | | doorDialog.dialogMidFraFrameLayout.X = Application.GetRealWidth(190); |
| | | doorDialog.dialogMidFraFrameLayout.Y = Application.GetRealHeight(202); |
| | | doorDialog.dialogMidFraFrameLayout.AddChidren(doorDialog.dialogMidText); |
| | | doorDialog.dialogMidText.Text = Language.StringByID(R.MyInternationalizationString.SureToDeleteTempPassword); |
| | | doorDialog.dialogMidText.TextSize = 14; |
| | | doorDialog.dialogMidFraFrameLayout.AddChidren(doorDialog.dialogMidText); |
| | | doorDialog.dialogBtnConfirm.Text = Language.StringByID(R.MyInternationalizationString.Confrim); |
| | | doorDialog.dialogBtnCancel.MouseUpEventHandler += (sender1, e1) => |
| | | { |
| | | dialog.Close(); |
| | | dialog1.Close(); |
| | | }; |
| | | doorDialog.dialogBtnConfirm.MouseUpEventHandler += (sender1, e1) => |
| | | { |
| | | dialog.Close(); |
| | | dialog1.Close(); |
| | | ClearEventHandler(btnDelText, dialog1); |
| | | }; |
| | | dialog.Close(); |
| | | string msg = Language.StringByID(R.MyInternationalizationString.SureToDeleteTempPassword); |
| | | var alert = new Shared.Phone.UserCenter.ShowMsgControl(ShowMsgType.Confirm, msg, Language.StringByID(R.MyInternationalizationString.DoorlockConfirm)); |
| | | alert.Show(); |
| | | //使用确认型弹框时,的回调函数 |
| | | alert.ConfirmClickEvent += () => |
| | | { |
| | | ClearEventHandler(btnDelText); |
| | | }; |
| | | }; |
| | | delBackgroundFrameLayout.MouseDownEventHandler += eHandler2; |
| | | btnDelIcon2.MouseDownEventHandler += eHandler2; |
| | |
| | | Y = Application.GetRealHeight(48), |
| | | TextAlignment = TextAlignment.Center, |
| | | Text = Language.StringByID(R.MyInternationalizationString.ClickGenerate), |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMTopTitleText, |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMBlack, |
| | | TextSize = 12, |
| | | Visible = true, |
| | | Enable = true, |
| | |
| | | |
| | | var randomPassword = new EditText() |
| | | { |
| | | X = Application.GetRealWidth(233), |
| | | Y = Application.GetRealHeight(153), |
| | | Height = Application.GetRealHeight(84), |
| | | Width = Application.GetRealWidth(251), |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextAlignment = TextAlignment.Center, |
| | | TextSize = 24, |
| | | SecureTextEntry = false, |
| | | Enable = false, |
| | |
| | | var validTime = new Button() |
| | | { |
| | | Height = Application.GetRealHeight(55), |
| | | Width = Application.GetRealWidth(115), |
| | | X = Application.GetRealWidth(92), |
| | | Width = Application.GetRealWidth(92 + 115), |
| | | Y = Application.GetRealHeight(386), |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMGray2, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = 14, |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | TextSize = 16, |
| | | }; |
| | | MidTopFrameLayout.AddChidren(validTime); |
| | | |
| | | var validTimeDate = new Button() |
| | | { |
| | | Height = Application.GetRealHeight(49), |
| | | Width = Application.GetRealWidth(135), |
| | | X = Application.GetRealWidth(84), |
| | | Width = Application.GetRealWidth(84 + 135), |
| | | Y = Application.GetRealHeight(441), |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMGray2, |
| | | TextSize = 10, |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, |
| | | TextSize = 12, |
| | | TextAlignment = TextAlignment.CenterRight, |
| | | }; |
| | | MidTopFrameLayout.AddChidren(validTimeDate); |
| | | |
| | | var inValidTime = new Button() |
| | | { |
| | | Height = Application.GetRealHeight(55), |
| | | Width = Application.GetRealWidth(118), |
| | | Width = Application.GetRealWidth(717 - 507), |
| | | X = Application.GetRealWidth(507), |
| | | Y = Application.GetRealHeight(389), |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMGray2, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = 14, |
| | | TextSize = 16, |
| | | }; |
| | | MidTopFrameLayout.AddChidren(inValidTime); |
| | | |
| | | var inValidTimeDate = new Button() |
| | | { |
| | | Height = Application.GetRealHeight(49), |
| | | Width = Application.GetRealWidth(135), |
| | | Width = Application.GetRealWidth(717 - 508), |
| | | X = Application.GetRealWidth(508), |
| | | Y = Application.GetRealHeight(444), |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMGray2, |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = 10, |
| | | TextSize = 12, |
| | | }; |
| | | MidTopFrameLayout.AddChidren(inValidTimeDate); |
| | | |
| | |
| | | { |
| | | randomPassword.Text = "- - - - - -"; |
| | | temPasswordVisiable.Visible = false; |
| | | randomPassword.X = Application.GetRealWidth(215); |
| | | randomPassword.TextColor = Shared.Common.ZigbeeColor.Current.XMGray4; |
| | | Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.IsModify = true; |
| | | topPic.Visible = true; |
| | |
| | | BackgroundColor = ZigbeeColor.Current.XMWhite, |
| | | }; |
| | | this.midFrameLayout.AddChidren(bottomFrameLayout); |
| | | bottomFrameLayout.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight); |
| | | |
| | | var informationEdit = new Button() |
| | | { |
| | |
| | | { |
| | | Width = Application.GetRealWidth(58), |
| | | Height = Application.GetRealHeight(58), |
| | | UnSelectedImagePath = "Item/Next.png", |
| | | UnSelectedImagePath = "Item/RightNext.png", |
| | | SelectedImagePath = "Item/Down.png", |
| | | }; |
| | | btnNextFrameLayout.AddChidren(btnNext); |
| | |
| | | { |
| | | if (curIndex == 0) |
| | | { |
| | | if (string.IsNullOrEmpty(doorLock.LocalTempPassword)) |
| | | { |
| | | //请"点击生成"临时密码; |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.SetTempPasswordTip1), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh); |
| | | }); |
| | | return; |
| | | } |
| | | var tempPage = new Shared.Phone.UserCenter.DoorLock.TimeSettignPage(doorLock, "ValidTime"); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(tempPage); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
| | |
| | | } |
| | | if (curIndex == 1) |
| | | { |
| | | if (string.IsNullOrEmpty(doorLock.LocalTempPassword)) |
| | | { |
| | | //请"点击生成"临时密码; |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.SetTempPasswordTip1), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh); |
| | | }); |
| | | return; |
| | | } |
| | | var tempPage = new Shared.Phone.UserCenter.DoorLock.TimeSettignPage(doorLock, "InValidTime"); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(tempPage); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
| | |
| | | BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect, |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMWhite, |
| | | TextSize = 16, |
| | | IsBold = true, |
| | | Enable = false, |
| | | }; |
| | | bottomFrameLayout.AddChidren(btnFinifh); |
| | |
| | | } |
| | | |
| | | //清除事件处理 |
| | | async void ClearEventHandler(Button btnDelText = null, Dialog dialog = null) |
| | | async void ClearEventHandler(Button btnDelText = null) |
| | | { |
| | | if (btnDelText == null) |
| | | { |
| | |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | if (dialog != null) |
| | | { |
| | | dialog.Close(); |
| | | } |
| | | |
| | | MidFrameLayoutContent(); |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | |
| | | } |
| | | else |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip); |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.CloudServerResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | } |
| | | } |
| | | catch { } |