From 160785587667cc0d927f85e44c139ec9dde13a9e Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期一, 25 十一月 2019 14:30:13 +0800 Subject: [PATCH] 原来的 IOS 工程舍弃(注:没有合并其他组员的代码) --- ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UnLockMethod.cs | 79 ++++++++++++++++++++++++++++----------- 1 files changed, 56 insertions(+), 23 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UnLockMethod.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UnLockMethod.cs index 7580a18..d9ad3be 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UnLockMethod.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UnLockMethod.cs @@ -63,7 +63,15 @@ Application.RunOnMainThread(() => { CommonPage.Loading.Start("Loading..."); }); try { - await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetLocaDoorLocklist(doorLock, curAccountObj); + var list = await Shared.Phone.UserCenter.DoorLock.DoorLockCommonInfo.GetDoorLockAllAcountUserlist(doorLock); + if (doorLock.IsFailedToGetDoorLockInfo[curAccountObj.SubAccountDistributedMark] == true) + { + //鏁版嵁濡傛灉鍦ㄩ棬閿佷笂闈㈡槸绌虹殑鏃跺�欙紝鏁版嵁涔熸槸娌℃湁鐨� + Application.RunOnMainThread(() => + { + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); + }); + } } catch { } finally @@ -112,19 +120,19 @@ btnAdd.Width = 0; } btnAdd.MouseDownEventHandler += (sender, e) => - { - if (doorLock.IsFreezeAccount[curAccountObj.SubAccountDistributedMark] == true) { - new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.AccountIsFreezed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip); - } - else - { - var addUnLockMethod = new Shared.Phone.UserCenter.DoorLock.AddUnLockMethod(doorLock, curAccountObj); - Shared.Phone.UserView.HomePage.Instance.AddChidren(addUnLockMethod); - Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; - addUnLockMethod.Show(); - } - }; + if (doorLock.IsFreezeAccount[curAccountObj.SubAccountDistributedMark] == true) + { + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.AccountIsFreezed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); + } + else + { + var addUnLockMethod = new Shared.Phone.UserCenter.DoorLock.AddUnLockMethod(doorLock, curAccountObj); + Shared.Phone.UserView.HomePage.Instance.AddChidren(addUnLockMethod); + Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; + addUnLockMethod.Show(); + } + }; if (UserCenterResourse.UserInfo.AuthorityNo == 3) { btnAddFrameLayout.Width = 0; @@ -151,8 +159,8 @@ Width = Application.GetRealWidth(141 + 100), Y = Application.GetRealHeight(35), X = Application.GetRealWidth(812 - 100), - TextAlignment = TextAlignment.Center, - Text = Language.StringByID(R.MyInternationalizationString.LockMethod), + TextAlignment = TextAlignment.CenterRight, + Text = Language.StringByID(R.MyInternationalizationString.AllMethod), TextColor = Shared.Common.ZigbeeColor.Current.XMTopTitleText, TextSize = 12, }; @@ -214,8 +222,8 @@ bodyView = new VerticalScrolViewLayout() { - Y = midTopFrameLayout.Bottom, - Height = Application.GetRealHeight(1921 - 184 - 115 - 1), + Y = btnLine.Bottom, + BackgroundColor = Shared.Common.ZigbeeColor.Current.XMWhite, }; this.midFrameLayout.AddChidren(bodyView); @@ -242,7 +250,7 @@ { if (doorLock.IsFailedToGetDoorLockInfo[curAccountObj.SubAccountDistributedMark] == true) { - new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(this.btnTip); + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); return; } bodyView.RemoveAll(); @@ -274,17 +282,23 @@ btnPicTip.Visible = false; btnPicTip1.Visible = false; } - + if (curAccountDoorLockUserList.Keys.Count == 0) + { + return; + } + bodyView.Height = curAccountDoorLockUserList.Keys.Count * Application.GetRealHeight(127 + 23); + int i = 0; foreach (var curUserId in curAccountDoorLockUserList.Keys) { var curDoorLockUser = curAccountDoorLockUserList[curUserId]; #region UI var rowFrameLayout = new RowLayout() { - Height = Application.GetRealHeight(173), + Height = Application.GetRealHeight(127 + 23), X = Application.GetRealWidth(58), Width = Application.GetRealWidth(965), LineColor = Shared.Common.ZigbeeColor.Current.XMRowLine, + BackgroundColor = Shared.Common.ZigbeeColor.Current.XMWhite, }; bodyView.AddChidren(rowFrameLayout); @@ -345,6 +359,12 @@ rowFrameLayout.AddRightView(btnDel); #endregion #region 鏁版嵁澶勭悊 + int currentIndex = i; + if (currentIndex == curAccountDoorLockUserList.Keys.Count - 1) + { + rowFrameLayout.LineColor = Shared.Common.ZigbeeColor.Current.XMWhite; + } + switch (curDoorLockUser.UnlockType) { case 0: @@ -553,7 +573,8 @@ } }; }; - #endregion + #endregion + i++; } } @@ -750,7 +771,11 @@ btnPicTip.Visible = false; btnPicTip1.Visible = false; } - + if (curAccountDoorLockUserList.Keys.Count == 0) + { + return; + } + int i = 0; foreach (var curUserId in curAccountDoorLockUserList.Keys) { var curDoorLockUser = curAccountDoorLockUserList[curUserId]; @@ -761,7 +786,7 @@ #region UI var rowFrameLayout = new RowLayout() { - Height = Application.GetRealHeight(173), + Height = Application.GetRealHeight(127 + 23), X = Application.GetRealWidth(58), Width = Application.GetRealWidth(965), LineColor = Shared.Common.ZigbeeColor.Current.XMRowLine, @@ -825,6 +850,11 @@ rowFrameLayout.AddRightView(btnDel); #endregion #region 鏁版嵁澶勭悊 + int currentIndex = i; + if (currentIndex == curAccountDoorLockUserList.Keys.Count - 1) + { + rowFrameLayout.LineColor = Shared.Common.ZigbeeColor.Current.XMWhite; + } switch (curDoorLockUser.UnlockType) { case 0: @@ -987,7 +1017,10 @@ }; }; #endregion + i++; } + + bodyView.Height = i * Application.GetRealHeight(127 + 23); } /// <summary> -- Gitblit v1.8.0