| | |
| | | Height = Application.GetRealHeight(69), |
| | | Y = Application.GetRealHeight(92), |
| | | TextID = MyInternationalizationString.userlist, |
| | | IsBold = true, |
| | | //Text = "选择用户", |
| | | }; |
| | | topRowLayout.AddChidren(titleName); |
| | |
| | | /// <summary> |
| | | /// 读取当前门锁的云端数据; |
| | | /// </summary> |
| | | public async void Read() |
| | | public void Read() |
| | | { |
| | | bool d = false; |
| | | string macport = Send.CurrentDoorLock.DeviceAddr + "_" + Send.CurrentDoorLock.DeviceEpoint.ToString(); |
| | |
| | | } |
| | | } |
| | | 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> |
| | | /// 显示所有用户 |
| | |
| | | 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]; |
| | |
| | | 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; |
| | | }; |
| | |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | Btncomplete.MouseUpEventHandler += (sender, e) => |
| | | { |
| | |
| | | { |
| | | 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; |
| | | } |