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/Device/Logic/MemberList.cs | 45 +++++++++++++++++++++++++++++++++------------ 1 files changed, 33 insertions(+), 12 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs b/ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs index c3b8852..a962515 100755 --- a/ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/MemberList.cs @@ -104,7 +104,7 @@ /// <summary> /// 璇诲彇褰撳墠闂ㄩ攣鐨勪簯绔暟鎹紱 /// </summary> - public async void Read() + public void Read() { bool d = false; @@ -119,14 +119,29 @@ } } + CommonPage.Loading.Start(); - if (!d) - { - var allMemberslist = await Send.AllMembers(common.DeviceAddr); - Send.LockList.AddRange(allMemberslist); - } - UserList(macport); - CommonPage.Loading.Hide(); + middle.RemoveAll(); + System.Threading.Tasks.Task.Run(async () => + { + try + { + if (!d) + { + var allMemberslist = await Send.AllMembers(macport); + Send.LockList.AddRange(allMemberslist); + } + } + catch { } + finally + { + Application.RunOnMainThread(() => + { + CommonPage.Loading.Hide(); + UserList(macport); + }); + } + }); } /// <summary> /// 鎴愬憳鍒楄〃鐨勬柟娉� @@ -134,7 +149,6 @@ /// <param name="macport"></param> public void UserList(string macport) { - middle.RemoveAll(); foreach (var user in Send.LockList) { if (user.DoorLockMacPort != macport) @@ -282,6 +296,13 @@ string SelectedDeviceStatuscondition = ""; lockcolorfra1.Y = Application.GetRealHeight(1920 - 140 - (160 * user.UserIdMode.Count) - 20 - 50); lockcolorfra1.Height = Application.GetRealHeight(140 + (160 * user.UserIdMode.Count) + 20 + 50); + if (user.UserIdMode.Count > 9) + { + ///鍏冪礌瓒呭嚭10涓紝鏆傛椂榛樿鏄剧ず10; + lockcolorfra1.Y = Application.GetRealHeight(1920 - 140 - (160 * 9) - 20 - 50); + lockcolorfra1.Height = Application.GetRealHeight(140 + (160 * 9) + 20 + 50); + } + for (int i = 0; i < user.UserIdMode.Count; i++) { var userifon = user.UserIdMode[i]; @@ -429,9 +450,9 @@ { if (!edit) { - var alert = new Alert(Language.StringByID(MyInternationalizationString.Prompt), - Language.StringByID(MyInternationalizationString.selectdevicestatuscondition), - Language.StringByID(MyInternationalizationString.complete)); + var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Normal, + Language.StringByID(MyInternationalizationString.selectdevicestatuscondition), + Language.StringByID(MyInternationalizationString.confrim)); alert.Show(); return; } -- Gitblit v1.8.0