From 97e259d966cb5cb5d73c105d5dbaadcc1f920614 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期五, 18 十月 2019 13:48:43 +0800 Subject: [PATCH] 合并了全部的代码 --- ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs | 98 ++++++++++++++++++++++++------------------------- 1 files changed, 48 insertions(+), 50 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs index 9548ee7..c3cd244 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs @@ -136,15 +136,12 @@ { 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); } @@ -152,7 +149,6 @@ { btnName.Y = Application.GetRealHeight(343); btnName.Text = Language.StringByID(R.MyInternationalizationString.BelongZone) + ":"; - var btnArea = new Button() { Width = Application.GetRealWidth(789 - 109 - 58), @@ -164,17 +160,10 @@ 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) { @@ -207,16 +196,13 @@ { 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; @@ -225,8 +211,39 @@ { 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) @@ -236,44 +253,25 @@ 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 } } -- Gitblit v1.8.0