| | |
| | | /// </summary> |
| | | private CommonDevice deviceObj = null; |
| | | Action action; |
| | | Action actionNone; |
| | | string modifyDeviceName = ""; |
| | | bool IsModifyName = true; |
| | | public Action<string> devicNameAction; |
| | |
| | | BackgroundImagePath = "DoorLock/DoorlockPicture.png", |
| | | }; |
| | | this.midFrameLayout.AddChidren(MidTopFrameLayout); |
| | | |
| | | var btnDeviceText = new Button() |
| | | { |
| | | Y = Application.GetRealHeight(288), |
| | | Height = Application.GetRealHeight(60), |
| | | Gravity = Gravity.CenterHorizontal, |
| | | TextColor = ZigbeeColor.Current.XMBlack, |
| | | TextSize = 15, |
| | | Text = Common.LocalDevice.Current.GetDeviceMacName(doorLock), |
| | | }; |
| | | this.midFrameLayout.AddChidren(btnDeviceText); |
| | | |
| | | BottomFrameLayout(); |
| | | } |
| | | |
| | | public void BottomFrameLayout() |
| | | { |
| | | #region UI |
| | | //var bottomFrameLayout = new FrameLayout() |
| | | //{ |
| | | // Height = Application.GetRealHeight(100), |
| | | // Y = Application.GetRealHeight(418), |
| | | // Radius = 17, |
| | | // BackgroundColor = ZigbeeColor.Current.XMWhite, |
| | | //}; |
| | | //this.midFrameLayout.AddChidren(bottomFrameLayout); |
| | | |
| | | //var bottomFrameLayout1 = new FrameLayout() |
| | | //{ |
| | | // Height = Application.GetRealHeight(1319 - 50), |
| | | // Y = Application.GetRealHeight(418 + 48), |
| | | // BackgroundColor = ZigbeeColor.Current.XMWhite, |
| | | //}; |
| | | //this.midFrameLayout.AddChidren(bottomFrameLayout1); |
| | | |
| | | var bottomFrameLayout = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(100), |
| | | Height = Application.GetRealHeight(1319), |
| | | Y = Application.GetRealHeight(418), |
| | | Radius = 17, |
| | | BackgroundColor = ZigbeeColor.Current.XMWhite, |
| | | }; |
| | | this.midFrameLayout.AddChidren(bottomFrameLayout); |
| | | |
| | | var bottomFrameLayout1 = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(1319 - 50), |
| | | Y = Application.GetRealHeight(418 + 48), |
| | | BackgroundColor = ZigbeeColor.Current.XMWhite, |
| | | }; |
| | | this.midFrameLayout.AddChidren(bottomFrameLayout1); |
| | | |
| | | var bottomFrameLayout2 = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(1000), |
| | | Y = Application.GetRealHeight(418), |
| | | }; |
| | | this.midFrameLayout.AddChidren(bottomFrameLayout2); |
| | | bottomFrameLayout.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight); |
| | | |
| | | var informationEdit = new Button() |
| | | { |
| | |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = 15, |
| | | }; |
| | | bottomFrameLayout2.AddChidren(informationEdit); |
| | | bottomFrameLayout.AddChidren(informationEdit); |
| | | |
| | | for (int i = 0; i < 6; i++) |
| | | { |
| | |
| | | { |
| | | Height = Application.GetRealHeight(58), |
| | | }; |
| | | bottomFrameLayout2.AddChidren(bottomRowLayout); |
| | | bottomFrameLayout.AddChidren(bottomRowLayout); |
| | | |
| | | var btnName = new Button() |
| | | { |
| | |
| | | BackgroundColor = Shared.Common.ZigbeeColor.Current.XMRowLine, |
| | | Visible = false, |
| | | }; |
| | | bottomFrameLayout2.AddChidren(btnLine); |
| | | bottomFrameLayout.AddChidren(btnLine); |
| | | |
| | | if (i == 0) |
| | | { |
| | | bottomRowLayout.Y = Application.GetRealHeight(220); |
| | | btnName.Text = Language.StringByID(R.MyInternationalizationString.DeviceRemarkXm); |
| | | btnNextFrameLayout.Width = btnNext.Width = Application.GetRealWidth(789 - 58); |
| | | btnNextFrameLayout.X = Application.GetRealWidth(233); |
| | | btnNext.Text = doorLock.DeviceName; |
| | | btnName.Text = Language.StringByID(R.MyInternationalizationString.DeviceRemarkXm) + ":"; |
| | | btnNextFrameLayout.Width = btnNext.Width = Application.GetRealWidth(789 - 58 - 20); |
| | | btnNextFrameLayout.X = Application.GetRealWidth(233 + 20); |
| | | var btnDeviceNameEditText = new EditText() |
| | | { |
| | | X = Application.GetRealWidth(46), |
| | | Width = Application.GetRealWidth(731), |
| | | Height = Application.GetRealHeight(58), |
| | | TextColor = ZigbeeColor.Current.XMGray3, |
| | | TextSize = 14, |
| | | PlaceholderTextColor = ZigbeeColor.Current.GXCPlaceHolderTextColor2, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | Text = string.IsNullOrEmpty(doorLock.DeviceName) ? Language.StringByID(R.MyInternationalizationString.UNKnown) : doorLock.DeviceName, |
| | |
| | | { |
| | | bottomRowLayout.Y = Application.GetRealHeight(481); |
| | | btnName.Text = Language.StringByID(R.MyInternationalizationString.BelongModel) + ":"; |
| | | btnNextFrameLayout.Width = btnNext.Width = Application.GetRealWidth(789 - 58); |
| | | btnNextFrameLayout.X = Application.GetRealWidth(233); |
| | | |
| | | btnNextFrameLayout.Width = btnNext.Width = Application.GetRealWidth(789 - 58 - 20); |
| | | btnNextFrameLayout.X = Application.GetRealWidth(253); |
| | | btnNext.TextAlignment = TextAlignment.CenterLeft; |
| | | btnNext.Height = Application.GetRealHeight(58); |
| | | btnNext.Text = doorLock.DeviceName; |
| | | btnNext.TextColor = Shared.Common.ZigbeeColor.Current.XMGray3; |
| | | |
| | | btnNext.TextSize = 14; |
| | | btnLine.Visible = true; |
| | | btnLine.Y = Application.GetRealHeight(575); |
| | | } |
| | |
| | | btnNext.SelectedImagePath = "DoorLock/SwitchOn.png"; |
| | | btnLine.Visible = true; |
| | | btnLine.Y = Application.GetRealHeight(853); |
| | | if (doorLock.RemoteUnlockPassword == "") |
| | | if (string.IsNullOrEmpty(doorLock.RemoteUnlockPassword)) |
| | | { |
| | | btnNext.IsSelected = false; |
| | | } |
| | |
| | | btnName.Text = Language.StringByID(R.MyInternationalizationString.DoorLockTime); |
| | | btnNextFrameLayout.Y = btnName.Y; |
| | | btnNext.UnSelectedImagePath = "DoorLock/RightIcon.png"; |
| | | btnLine.Visible = false; |
| | | btnLine.Visible = true; |
| | | btnLine.Y = Application.GetRealHeight(992); |
| | | } |
| | | int currentIndex = i; |
| | |
| | | { |
| | | if (currentIndex == 3) |
| | | { |
| | | if (!UserCenterResourse.Option.DoorUnLockByRemote) |
| | | action = async () => |
| | | { |
| | | SecurityRequest(doorLock, action); |
| | | } |
| | | else |
| | | var temporaryPassword = new Shared.Phone.UserCenter.DoorLock.TemporaryPassword(doorLock); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(temporaryPassword); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
| | | temporaryPassword.Show(); |
| | | }; |
| | | actionNone = async () => |
| | | { |
| | | action = async () => |
| | | { |
| | | var temporaryPassword = new Shared.Phone.UserCenter.DoorLock.TemporaryPassword(doorLock); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(temporaryPassword); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
| | | temporaryPassword.Show(); |
| | | }; |
| | | HdlCheckLogic.Current.CheckSecondarySecurity(action); |
| | | } |
| | | Shared.Phone.UserCenter.DoorLock.DoorLockCommonLayout.SecurityRequest(doorLock, action); |
| | | }; |
| | | HdlCheckLogic.Current.CheckSecondarySecurity(action, actionNone); |
| | | } |
| | | else if (currentIndex == 4) |
| | | { |
| | |
| | | btnNext.IsSelected = !btnNext.IsSelected; |
| | | if (btnNext.IsSelected) |
| | | { |
| | | if (doorLock.RemoteUnlockPassword == "") |
| | | if (string.IsNullOrEmpty(doorLock.RemoteUnlockPassword)) |
| | | { |
| | | RemotePasswordDialog(doorLock, btnNext); |
| | | } |
| | |
| | | btnNext.IsSelected = !btnNext.IsSelected; |
| | | if (btnNext.IsSelected) |
| | | { |
| | | if (doorLock.RemoteUnlockPassword == "") |
| | | if (string.IsNullOrEmpty(doorLock.RemoteUnlockPassword)) |
| | | { |
| | | RemotePasswordDialog(doorLock, btnNext); |
| | | } |
| | |
| | | } |
| | | } |
| | | }; |
| | | bottomRowLayout.MouseDownEventHandler += eHandler; |
| | | btnNext.MouseDownEventHandler += eHandler; |
| | | btnName.MouseDownEventHandler += eHandler; |
| | | btnNextFrameLayout.MouseDownEventHandler += eHandler; |
| | | if (i != 4) |
| | | { |
| | | bottomRowLayout.MouseDownEventHandler += eHandler; |
| | | btnName.MouseDownEventHandler += eHandler; |
| | | btnNextFrameLayout.MouseDownEventHandler += eHandler; |
| | | } |
| | | #endregion |
| | | } |
| | | |
| | |
| | | BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack, |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMWhite, |
| | | TextSize = 16, |
| | | IsBold = true, |
| | | }; |
| | | this.midFrameLayout.AddChidren(btnFinifh); |
| | | btnFinifh.MouseUpEventHandler += (sender, e) => |