From 1a2061079e97a738ec7b8959bfd9a6e6c6997403 Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期四, 31 十月 2019 09:59:29 +0800 Subject: [PATCH] 2019.10.31 --- ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs | 98 +++++++++++++++++++++++++------------------------ 1 files changed, 50 insertions(+), 48 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs index c3cd244..9548ee7 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs @@ -136,12 +136,15 @@ { 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); } @@ -149,6 +152,7 @@ { btnName.Y = Application.GetRealHeight(343); btnName.Text = Language.StringByID(R.MyInternationalizationString.BelongZone) + ":"; + var btnArea = new Button() { Width = Application.GetRealWidth(789 - 109 - 58), @@ -160,10 +164,17 @@ 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) { @@ -196,13 +207,16 @@ { 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; @@ -211,39 +225,8 @@ { btnNext.IsSelected = true; } - } - 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) + + EventHandler<MouseEventArgs> eHandlerRemotelyUnlock = (sender, e) => { btnNext.IsSelected = !btnNext.IsSelected; if (btnNext.IsSelected) @@ -253,25 +236,44 @@ RemotePasswordDialog(doorLock, btnNext); } } - else - { - ZigBee.Device.DoorLock.RemoteUnlockPassword = ""; - } - } - else if (currentIndex == 5) + 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) => { - var tempPage = new Shared.Phone.UserCenter.DoorLock.TimeSettignPage(doorLock, "DoorLockTime"); + var tempPage = new Shared.Phone.UserCenter.DoorLock.TimeSettignPage(doorLock, "InValidTime"); Shared.Phone.UserView.HomePage.Instance.AddChidren(tempPage); Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; tempPage.Show(); - } - else if (currentIndex == 6) - { - } - }; - btnNext.MouseDownEventHandler += eHandler; - btnName.MouseDownEventHandler += eHandler; - btnNextFrameLayout.MouseDownEventHandler += eHandler; + }; + 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); + } #endregion } } -- Gitblit v1.8.0