From 66a9965c44ecc32a6696abca876ab9d1cd091584 Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期五, 28 二月 2020 15:25:13 +0800 Subject: [PATCH] 2020.2.28 --- ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UndistributeDoorlockUserPage.cs | 58 ++++++++++++++++++++++++++++++++++------------------------ 1 files changed, 34 insertions(+), 24 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UndistributeDoorlockUserPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UndistributeDoorlockUserPage.cs index 4f3edaa..0fda080 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UndistributeDoorlockUserPage.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UndistributeDoorlockUserPage.cs @@ -100,8 +100,9 @@ Y = Application.GetRealHeight(35), X = Application.GetRealWidth(812 - 100), TextAlignment = TextAlignment.CenterRight, - TextColor = Shared.Common.ZigbeeColor.Current.XMTopTitleText, + TextColor = Shared.Common.ZigbeeColor.Current.XMBlack, TextSize = 12, + IsBold = true, }; midTopFrameLayout.AddChidren(btnAllMethod); // 绫诲瀷鍖哄垎 @@ -136,11 +137,12 @@ SelectedImagePath = "DoorLock/UnLockSideslipIcon.png", }; midTopFrameLayout.AddChidren(btnNext); - btnNext.MouseUpEventHandler += (sender, e) => + EventHandler<MouseEventArgs> handerSideLip = (sender, e) => { SideslipFramelayout(); }; - + btnNext.MouseUpEventHandler += handerSideLip; + btnAllMethod.MouseUpEventHandler += handerSideLip; var btnLine = new Button { Y = midTopFrameLayout.Bottom, @@ -172,7 +174,7 @@ foreach (var curUserId in doorLock.localDoorLockUserList.Keys) { var curDoorLockUser = doorLock.localDoorLockUserList[curUserId]; - if (curDoorLockUser.ConnectedAccount != "") + if (!string.IsNullOrEmpty(curDoorLockUser.ConnectedAccount)) { continue; } @@ -243,6 +245,7 @@ TextAlignment = TextAlignment.CenterLeft, TextColor = Shared.Common.ZigbeeColor.Current.XMBlack, Gravity = Gravity.CenterVertical, + TextSize = 15, }; rowFrameLayout.AddChidren(btnText); @@ -265,7 +268,7 @@ switch (curDoorLockUser.UnlockType) { case 0: - if (curDoorLockUser.UserName != "" && curDoorLockUser.UserName != null) + if (!string.IsNullOrEmpty(curDoorLockUser.UserName)) { btnText.Text = curDoorLockUser.UserName; } @@ -275,7 +278,7 @@ } break; case 3: - if (curDoorLockUser.UserName != "" && curDoorLockUser.UserName != null) + if (!string.IsNullOrEmpty(curDoorLockUser.UserName)) { btnText.Text = curDoorLockUser.UserName; } @@ -285,7 +288,7 @@ } break; case 15: - if (curDoorLockUser.UserName != "" && curDoorLockUser.UserName != null) + if (!string.IsNullOrEmpty(curDoorLockUser.UserName)) { btnText.Text = curDoorLockUser.UserName; } @@ -314,7 +317,7 @@ { #region UI FrameLayout flMain = new FrameLayout { BackgroundColor = 0x0f000000 }; - this.midFrameLayout.AddChidren(flMain); + this.AddChidren(flMain); flMain.MouseUpEventHandler += (sender11, e11) => { flMain.RemoveFromParent(); @@ -323,24 +326,24 @@ bottomFrameLayout = new FrameLayout() { Height = Application.GetRealHeight(100), - Y = Application.GetRealHeight(930), - Radius = 17, + Y = Application.GetRealHeight(1253), + Radius = (uint)Application.GetRealHeight(100 / 2), BackgroundColor = ZigbeeColor.Current.XMWhite, }; flMain.AddChidren(bottomFrameLayout); var bottomFrameLayout1 = new FrameLayout() { - Height = Application.GetRealHeight(806 - 50), - Y = Application.GetRealHeight(930 + 48), + Height = Application.GetRealHeight(668 - 60), + Y = Application.GetRealHeight(1253 + 58), BackgroundColor = ZigbeeColor.Current.XMWhite, }; flMain.AddChidren(bottomFrameLayout1); var bottomFrameLayout2 = new FrameLayout() { - Height = Application.GetRealHeight(806), - Y = Application.GetRealHeight(930), + Height = Application.GetRealHeight(668), + Y = Application.GetRealHeight(1253), }; flMain.AddChidren(bottomFrameLayout2); @@ -455,7 +458,7 @@ btnLine.Visible = false; } - if (currentAccount.UserName != "" && currentAccount.UserName != null) + if (!string.IsNullOrEmpty(currentAccount.UserName)) { btnUserName.Text = currentAccount.UserName; } @@ -519,12 +522,12 @@ CommonPage.Loading.Start(""); }); if (curAccountId == "") - { + { Application.RunOnMainThread(() => { flMain.RemoveFromParent(); bottomFrameLayout.RemoveAll(); - CommonPage.Loading.Hide (); + CommonPage.Loading.Hide(); }); } else @@ -545,7 +548,7 @@ switch (curDoorLockUser.UnlockType) { case 0: - if (curDoorLockUser.UserName != "" && curDoorLockUser.UserName != null) + if (!string.IsNullOrEmpty(curDoorLockUser.UserName)) { addLockInfo.UserIdRemarks = curDoorLockUser.UserName; } @@ -555,7 +558,7 @@ } break; case 3: - if (curDoorLockUser.UserName != "" && curDoorLockUser.UserName != null) + if (!string.IsNullOrEmpty(curDoorLockUser.UserName)) { addLockInfo.UserIdRemarks = curDoorLockUser.UserName; } @@ -565,7 +568,7 @@ } break; case 15: - if (curDoorLockUser.UserName != "" && curDoorLockUser.UserName != null) + if (!string.IsNullOrEmpty(curDoorLockUser.UserName)) { addLockInfo.UserIdRemarks = curDoorLockUser.UserName; } @@ -596,11 +599,12 @@ { Application.RunOnMainThread(() => { + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.DistributeSuccess), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); TypeRefresh(); CommonPage.Loading.Hide(); flMain.RemoveFromParent(); bottomFrameLayout.RemoveAll(); - }); + }); } else { @@ -684,7 +688,7 @@ { Width = Application.GetRealWidth(81), Height = Application.GetRealHeight(81), - Y = Application.GetRealHeight(55), + Y = Application.GetRealHeight(35), }; rowFrameLayout.AddChidren(btnAllMethod); @@ -693,7 +697,7 @@ Width = Application.GetRealWidth(311), Height = Application.GetRealHeight(58), X = Application.GetRealWidth(92), - Y = Application.GetRealHeight(69), + Y = Application.GetRealHeight(49), TextColor = Shared.Common.ZigbeeColor.Current.XMGray3, TextSize = 14, TextAlignment = TextAlignment.CenterLeft, @@ -717,6 +721,7 @@ doorLock.currentUserDisplayMethod = btnMethodText.Text; btnAllMethod.IsSelected = true; oldbuttonText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack; + oldbuttonText.IsBold = true; TypeRefresh(); } dialog.Close(); @@ -749,10 +754,11 @@ break; } - if (doorLock.currentUserDisplayMethod == "" && i == 0) + if (string.IsNullOrEmpty(doorLock.currentUserDisplayMethod) && i == 0) { btnAllMethod.IsSelected = true; btnMethodText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack; + btnMethodText.IsBold = true; oldbutton = btnAllMethod; oldbuttonText = btnMethodText; } @@ -760,6 +766,7 @@ { btnAllMethod.IsSelected = true; btnMethodText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack; + btnMethodText.IsBold = true; oldbutton = btnAllMethod; oldbuttonText = btnMethodText; } @@ -767,6 +774,7 @@ { btnAllMethod.IsSelected = true; btnMethodText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack; + btnMethodText.IsBold = true; oldbutton = btnAllMethod; oldbuttonText = btnMethodText; } @@ -774,6 +782,7 @@ { btnAllMethod.IsSelected = true; btnMethodText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack; + btnMethodText.IsBold = true; oldbutton = btnAllMethod; oldbuttonText = btnMethodText; } @@ -781,6 +790,7 @@ { btnAllMethod.IsSelected = true; btnMethodText.TextColor = Shared.Common.ZigbeeColor.Current.XMBlack; + btnMethodText.IsBold = true; oldbutton = btnAllMethod; oldbuttonText = btnMethodText; } -- Gitblit v1.8.0