| | |
| | | { |
| | | btnName.Y = Application.GetRealHeight(204); |
| | | btnName.Text = Language.StringByID(R.MyInternationalizationString.DeviceName) + ":"; |
| | | |
| | | btnNextFrameLayout.Width = btnNext.Width = Application.GetRealWidth(789 - 58); |
| | | btnNextFrameLayout.Y = btnName.Y; |
| | | btnNextFrameLayout.X = btnName.Right; |
| | | |
| | | btnNext.TextAlignment = TextAlignment.CenterLeft; |
| | | btnNext.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | btnNext.Text = "智能门锁"; |
| | | |
| | | btnLine.Visible = true; |
| | | btnLine.Y = Application.GetRealHeight(308); |
| | | } |
| | |
| | | { |
| | | btnName.Y = Application.GetRealHeight(343); |
| | | btnName.Text = Language.StringByID(R.MyInternationalizationString.BelongZone) + ":"; |
| | | |
| | | var btnArea = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(789 - 109 - 58), |
| | |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | }; |
| | | bottomFrameLayout2.AddChidren(btnArea); |
| | | |
| | | btnNextFrameLayout.Y = btnName.Y; |
| | | btnNext.UnSelectedImagePath = "DoorLock/RightIcon.png"; |
| | | |
| | | btnLine.Visible = true; |
| | | btnLine.Y = Application.GetRealHeight(446); |
| | | |
| | | btnNext.MouseDownEventHandler += (sender, e) => |
| | | { |
| | | |
| | | }; |
| | | } |
| | | else if (i == 2) |
| | | { |
| | |
| | | { |
| | | btnName.Y = Application.GetRealHeight(723 + 35); |
| | | btnName.Text = Language.StringByID(R.MyInternationalizationString.RemotelyUnlock); |
| | | |
| | | btnNextFrameLayout.Y = btnName.Y; |
| | | btnNext.Width = Application.GetRealWidth(104); |
| | | btnNext.Height = Application.GetRealHeight(63); |
| | | btnNext.UnSelectedImagePath = "DoorLock/Switch.png"; |
| | | btnNext.SelectedImagePath = "DoorLock/SwitchOn.png"; |
| | | |
| | | btnLine.Visible = true; |
| | | btnLine.Y = Application.GetRealHeight(723 + 127); |
| | | |
| | | if (ZigBee.Device.DoorLock.RemoteUnlockPassword == "") |
| | | { |
| | | btnNext.IsSelected = false; |
| | |
| | | { |
| | | btnNext.IsSelected = true; |
| | | } |
| | | |
| | | EventHandler<MouseEventArgs> eHandlerRemotelyUnlock = (sender, e) => |
| | | } |
| | | else if (i == 5) |
| | | { |
| | | btnName.Y = Application.GetRealHeight(861 + 35); |
| | | btnName.Text = Language.StringByID(R.MyInternationalizationString.DoorLockTime); |
| | | btnNextFrameLayout.Y = btnName.Y; |
| | | btnNext.UnSelectedImagePath = "DoorLock/RightIcon.png"; |
| | | btnLine.Visible = true; |
| | | btnLine.Y = Application.GetRealHeight(861 + 127); |
| | | } |
| | | else if (i == 6) |
| | | { |
| | | btnName.Y = Application.GetRealHeight(999 + 35); |
| | | btnName.Text = Language.StringByID(R.MyInternationalizationString.Shared); |
| | | btnNextFrameLayout.Y = btnName.Y; |
| | | btnNext.UnSelectedImagePath = "DoorLock/RightIcon.png"; |
| | | btnLine.Visible = true; |
| | | btnLine.Y = Application.GetRealHeight(999 + 127); |
| | | } |
| | | int currentIndex = i; |
| | | EventHandler<MouseEventArgs> eHandler = (sender, e) => |
| | | { |
| | | if (currentIndex == 1) |
| | | { |
| | | } |
| | | else if (currentIndex == 3) |
| | | { |
| | | 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(); |
| | | } |
| | | else if (currentIndex == 4) |
| | | { |
| | | btnNext.IsSelected = !btnNext.IsSelected; |
| | | if (btnNext.IsSelected) |
| | |
| | | RemotePasswordDialog(doorLock, btnNext); |
| | | } |
| | | } |
| | | return; |
| | | }; |
| | | btnNext.MouseDownEventHandler += eHandlerRemotelyUnlock; |
| | | btnName.MouseDownEventHandler += eHandlerRemotelyUnlock; |
| | | btnNextFrameLayout.MouseDownEventHandler += eHandlerRemotelyUnlock; |
| | | } |
| | | else if (i == 5) |
| | | { |
| | | btnName.Y = Application.GetRealHeight(861 + 35); |
| | | btnName.Text = Language.StringByID(R.MyInternationalizationString.DoorLockTime); |
| | | |
| | | btnNextFrameLayout.Y = btnName.Y; |
| | | btnNext.UnSelectedImagePath = "DoorLock/RightIcon.png"; |
| | | |
| | | btnLine.Visible = true; |
| | | btnLine.Y = Application.GetRealHeight(861 + 127); |
| | | EventHandler<MouseEventArgs> eHandlerDoorLockTime = (sender, e) => |
| | | else |
| | | { |
| | | ZigBee.Device.DoorLock.RemoteUnlockPassword = ""; |
| | | } |
| | | } |
| | | else if (currentIndex == 5) |
| | | { |
| | | var tempPage = new Shared.Phone.UserCenter.DoorLock.TimeSettignPage(doorLock, "InValidTime"); |
| | | var tempPage = new Shared.Phone.UserCenter.DoorLock.TimeSettignPage(doorLock, "DoorLockTime"); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(tempPage); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
| | | tempPage.Show(); |
| | | }; |
| | | btnNext.MouseDownEventHandler += eHandlerDoorLockTime; |
| | | btnName.MouseDownEventHandler += eHandlerDoorLockTime; |
| | | btnNextFrameLayout.MouseDownEventHandler += eHandlerDoorLockTime; |
| | | } |
| | | else if (i == 6) |
| | | { |
| | | btnName.Y = Application.GetRealHeight(999 + 35); |
| | | btnName.Text = Language.StringByID(R.MyInternationalizationString.Shared); |
| | | |
| | | btnNextFrameLayout.Y = btnName.Y; |
| | | btnNext.UnSelectedImagePath = "DoorLock/RightIcon.png"; |
| | | |
| | | btnLine.Visible = true; |
| | | btnLine.Y = Application.GetRealHeight(999 + 127); |
| | | } |
| | | } |
| | | else if (currentIndex == 6) |
| | | { |
| | | } |
| | | }; |
| | | btnNext.MouseDownEventHandler += eHandler; |
| | | btnName.MouseDownEventHandler += eHandler; |
| | | btnNextFrameLayout.MouseDownEventHandler += eHandler; |
| | | #endregion |
| | | } |
| | | } |