| | |
| | | /// </summary> |
| | | public void Show() |
| | | { |
| | | this.TopFrameLayout(this, Language.StringByID(R.MyInternationalizationString.FunctionSetting)); |
| | | this.TopFrameLayout(this, Language.StringByID(R.MyInternationalizationString.DoorLockFunctionSetting)); |
| | | |
| | | EventHandler<MouseEventArgs> eHandlerBack = (sender, e) => |
| | | { |
| | |
| | | Text = Language.StringByID(R.MyInternationalizationString.InformationEdit), |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMBlack, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = 12, |
| | | TextSize = 15, |
| | | }; |
| | | bottomFrameLayout2.AddChidren(informationEdit); |
| | | |
| | |
| | | X = Application.GetRealWidth(58), |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMBlack, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextSize = 12, |
| | | TextSize = 14, |
| | | }; |
| | | bottomRowLayout.AddChidren(btnName); |
| | | |
| | |
| | | var btnLine = new FrameLayout() |
| | | { |
| | | Width = Application.GetRealWidth(965), |
| | | Height = Application.GetRealHeight(2), |
| | | Height = 1, |
| | | X = Application.GetRealWidth(58), |
| | | BackgroundColor = Shared.Common.ZigbeeColor.Current.XMRowLine, |
| | | Visible = false, |
| | |
| | | } |
| | | else if (i == 3) |
| | | { |
| | | bottomRowLayout.Y = Application.GetRealHeight(723 + 35); |
| | | bottomRowLayout.Y = Application.GetRealHeight(585 + 35); |
| | | btnNext.X = Application.GetRealWidth(0); |
| | | btnName.Text = Language.StringByID(R.MyInternationalizationString.RemotelyUnlock); |
| | | btnNext.Width = Application.GetRealWidth(104); |
| | |
| | | btnNext.UnSelectedImagePath = "DoorLock/Switch.png"; |
| | | btnNext.SelectedImagePath = "DoorLock/SwitchOn.png"; |
| | | btnLine.Visible = true; |
| | | btnLine.Y = Application.GetRealHeight(853); |
| | | if (ZigBee.Device.DoorLock.RemoteUnlockPassword == "") |
| | | btnLine.Y = Application.GetRealHeight(714); |
| | | if (doorLock.RemoteUnlockPassword == "") |
| | | { |
| | | btnNext.IsSelected = false; |
| | | } |
| | |
| | | } |
| | | |
| | | int currentIndex = i; |
| | | EventHandler<MouseEventArgs> eHandler = (sender, e) => |
| | | { |
| | | if (currentIndex == 3) |
| | | { |
| | | //if (doorLock.HasRemoteUnlockAccess[acc.SubAccountDistributedMark] == true) |
| | | //{ |
| | | |
| | | //} |
| | | //else |
| | | //{ |
| | | |
| | | //} |
| | | btnNext.IsSelected = !btnNext.IsSelected; |
| | | if (btnNext.IsSelected) |
| | | { |
| | | if (ZigBee.Device.DoorLock.RemoteUnlockPassword == "") |
| | | { |
| | | RemotePasswordDialog(doorLock, btnNext); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | ZigBee.Device.DoorLock.RemoteUnlockPassword = ""; |
| | | } |
| | | } |
| | | }; |
| | | EventHandler<MouseEventArgs> eHandler = async (sender, e) => |
| | | { |
| | | if (currentIndex == 3) |
| | | { |
| | | var result = await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetDoorLockOperateAccess(doorLock, Shared.Common.Config.Instance.Guid); |
| | | if (result == false) |
| | | { |
| | | var result1 = await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetDoorLockUnlockAccess(doorLock, Shared.Common.Config.Instance.Guid); |
| | | if (result1 == true) |
| | | { |
| | | btnNext.IsSelected = !btnNext.IsSelected; |
| | | if (btnNext.IsSelected) |
| | | { |
| | | if (doorLock.RemoteUnlockPassword == "") |
| | | { |
| | | RemotePasswordDialog(doorLock, btnNext); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | doorLock.RemoteUnlockPassword = ""; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.NoAccess), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.AccountIsFreezed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip); |
| | | } |
| | | } |
| | | }; |
| | | bottomRowLayout.MouseDownEventHandler += eHandler; |
| | | btnNext.MouseDownEventHandler += eHandler; |
| | | btnName.MouseDownEventHandler += eHandler; |