From 1c4904d77f484c075080942d87785481b52b6fb2 Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期一, 28 十月 2019 14:58:46 +0800 Subject: [PATCH] Revert "Merge branch 'dev-tzy' into DEV_GXC" --- ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs | 133 ++++++++++++++++++++++---------------------- 1 files changed, 67 insertions(+), 66 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs index b7eea61..9548ee7 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs @@ -96,12 +96,6 @@ for (int i = 0; i < 7; i++) { - var bottomRowLayout = new FrameLayout() - { - Height = Application.GetRealHeight(58), - }; - bottomFrameLayout2.AddChidren(bottomRowLayout); - var btnName = new Button() { Width = Application.GetRealWidth(233), @@ -111,7 +105,7 @@ TextAlignment = TextAlignment.CenterLeft, TextSize = 12, }; - bottomRowLayout.AddChidren(btnName); + bottomFrameLayout2.AddChidren(btnName); var btnNextFrameLayout = new FrameLayout() { @@ -119,12 +113,12 @@ Height = Application.GetRealHeight(58), X = Application.GetRealWidth(861 + 58), }; - bottomRowLayout.AddChidren(btnNextFrameLayout); + bottomFrameLayout2.AddChidren(btnNextFrameLayout); var btnNext = new Button() { - Width = Application.GetRealWidth(58), - Height = Application.GetRealHeight(58), + Width = Application.GetRealWidth(60), + Height = Application.GetRealHeight(60), }; btnNextFrameLayout.AddChidren(btnNext); @@ -140,20 +134,25 @@ if (i == 0) { - bottomRowLayout.Y = Application.GetRealHeight(204); - btnName.Text = Language.StringByID(R.MyInternationalizationString.DeviceRemarkXm) + ":"; + 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 = doorLock.DeviceName; + btnNext.Text = "鏅鸿兘闂ㄩ攣"; + btnLine.Visible = true; btnLine.Y = Application.GetRealHeight(308); } else if (i == 1) { - bottomRowLayout.Y = Application.GetRealHeight(343); + btnName.Y = Application.GetRealHeight(343); btnName.Text = Language.StringByID(R.MyInternationalizationString.BelongZone) + ":"; + var btnArea = new Button() { Width = Application.GetRealWidth(789 - 109 - 58), @@ -164,16 +163,25 @@ Text = "涓�妤硷紝瀹㈠巺", TextAlignment = TextAlignment.CenterLeft, }; - bottomRowLayout.AddChidren(btnArea); + 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) { - bottomRowLayout.Y = Application.GetRealHeight(481); + btnName.Y = Application.GetRealHeight(481); btnName.Text = Language.StringByID(R.MyInternationalizationString.BelongModel) + ":"; btnNextFrameLayout.Width = btnNext.Width = Application.GetRealWidth(789 - 58); + btnNextFrameLayout.Y = btnName.Y; btnNextFrameLayout.X = btnName.Right; btnNext.TextAlignment = TextAlignment.CenterLeft; @@ -186,9 +194,10 @@ } else if (i == 3) { - bottomRowLayout.Y = Application.GetRealHeight(585 + 35); + btnName.Y = Application.GetRealHeight(585 + 35); btnName.Text = Language.StringByID(R.MyInternationalizationString.TemporaryPassword); + btnNextFrameLayout.Y = btnName.Y; btnNext.UnSelectedImagePath = "DoorLock/RightIcon.png"; btnLine.Visible = true; @@ -196,14 +205,18 @@ } else if (i == 4) { - bottomRowLayout.Y = Application.GetRealHeight(723 + 35); + 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; @@ -212,38 +225,8 @@ { btnNext.IsSelected = true; } - } - else if (i == 5) - { - bottomRowLayout.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) - { - bottomRowLayout.Y = Application.GetRealHeight(999 + 35); - btnName.Text = Language.StringByID(R.MyInternationalizationString.Shared); - 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,26 +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) - { - } - }; - bottomRowLayout.MouseDownEventHandler += eHandler; - 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