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/DoorLockLogic/AddCondition.cs | 50 +++++++++++++++++++++++++++++++++++++------------- 1 files changed, 37 insertions(+), 13 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/AddCondition.cs b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/AddCondition.cs index 36a7fc5..931f2e0 100755 --- a/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/AddCondition.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/DoorLockLogic/AddCondition.cs @@ -36,6 +36,7 @@ Height = Application.GetRealHeight(69), Y = Application.GetRealHeight(92), TextID = MyInternationalizationString.userlist, + IsBold = true, //Text = "閫夋嫨鐢ㄦ埛", }; topRowLayout.AddChidren(titleName); @@ -99,7 +100,7 @@ /// <summary> /// 璇诲彇褰撳墠闂ㄩ攣鐨勪簯绔暟鎹紱 /// </summary> - public async void Read() + public void Read() { bool d = false; string macport = Send.CurrentDoorLock.DeviceAddr + "_" + Send.CurrentDoorLock.DeviceEpoint.ToString(); @@ -113,13 +114,27 @@ } } CommonPage.Loading.Start(); - if (!d) + middle.RemoveAll(); + System.Threading.Tasks.Task.Run(async () => { - var allMemberslist = await Send.AllMembers(Send.CurrentDoorLock.DeviceAddr); - Send.LockList.AddRange(allMemberslist); - } - UserAllView(macport); - CommonPage.Loading.Hide(); + try + { + if (!d) + { + var allMemberslist = await Send.AllMembers(macport); + Send.LockList.AddRange(allMemberslist); + } + } + catch { } + finally + { + Application.RunOnMainThread(() => + { + CommonPage.Loading.Hide(); + UserAllView(macport); + }); + } + }); } /// <summary> /// 鏄剧ず鎵�鏈夌敤鎴� @@ -266,13 +281,21 @@ lockRow.AddChidren(Btncomplete); #endregion - string SelectedLockStatus = ""; + lockcolorfra1.Y = Application.GetRealHeight(1920 - 140 - (160 * membershipIfon.UserIdMode.Count) - 20 - 50); lockcolorfra1.Height = Application.GetRealHeight(140 + (160 * membershipIfon.UserIdMode.Count) + 20 + 50); + if (membershipIfon.UserIdMode.Count > 9) + { + ///鍏冪礌瓒呭嚭10涓紝鏆傛椂榛樿鏄剧ず10; + lockcolorfra1.Y = Application.GetRealHeight(1920 - 140 - (160 * 9) - 20 - 50); + lockcolorfra1.Height = Application.GetRealHeight(140 + (160 * 9) + 20 + 50); + } + string SelectedLockStatus = ""; ///瀹氫箟涓や釜鍙橀噺璁板綍閫変腑鐘舵�侊紱 string attriButeId = ""; string attriButeData2 = ""; string modeName = ""; + for (int j = 0; j < membershipIfon.UserIdMode.Count; j++) { var userIdmode = membershipIfon.UserIdMode[j]; @@ -324,8 +347,8 @@ selectedIcon.Visible = false; selectedIcon = doorlockSelected; doorlockSelected.Visible = true; - //doorlockBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; - attriButeId = userIdmode.OpenMode.ToString(); + //doorlockBtn.TextColor = ZigbeeColor.Current.LogicBtnSelectedColor; + attriButeId = userIdmode.OpenMode.ToString(); attriButeData2 = userIdmode.UserId; modeName = userIdmode.ModeName; }; @@ -347,6 +370,7 @@ } } + Btncomplete.MouseUpEventHandler += (sender, e) => { @@ -432,9 +456,9 @@ { if (conditionsIndex == -1) { - 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.usertip), + Language.StringByID(MyInternationalizationString.confrim)); alert.Show(); return; } -- Gitblit v1.8.0