| | |
| | | }; |
| | | this.AddChidren(middle); |
| | | |
| | | |
| | | if (Send.LinkageventLockList.Count == 0) |
| | | bool d = false; |
| | | string macport = Send.CurrentDoorLock.DeviceAddr + "_" + Send.CurrentDoorLock.DeviceEpoint.ToString(); |
| | | for (int i = 0; i < Send.LockList.Count; i++) |
| | | { |
| | | var allMemberslist = await Send.AllMembers(Send.CurrentDoorLock.DeviceAddr); |
| | | Send.LinkageventLockList.AddRange(allMemberslist); |
| | | if (Send.LockList[i].DoorLockMacPort == macport) |
| | | { |
| | | ///已经存在该门锁信息 |
| | | d = true; |
| | | break; |
| | | } |
| | | |
| | | } |
| | | UserAllView(middle); |
| | | |
| | | if (!d) |
| | | { |
| | | |
| | | var allMemberslist = await Send.AllMembers(Send.CurrentDoorLock.DeviceAddr); |
| | | Send.LockList.AddRange(allMemberslist); |
| | | } |
| | | UserAllView(middle, macport); |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 显示所有用户 |
| | | /// </summary> |
| | | /// <param name="middle"></param> |
| | | void UserAllView(VerticalScrolViewLayout middle) |
| | | void UserAllView(VerticalScrolViewLayout middle,string macport) |
| | | { |
| | | |
| | | for (int i = 0; i < Send.LinkageventLockList.Count; i++) |
| | | for (int i = 0; i < Send.LockList.Count; i++) |
| | | { |
| | | var user = Send.LinkageventLockList[i]; |
| | | var user = Send.LockList[i]; |
| | | if (user.DoorLockMacPort != macport) |
| | | { |
| | | continue; |
| | | } |
| | | var userFramelayout = new FrameLayout |
| | | { |
| | | Height = Application.GetRealHeight(160), |
| | |
| | | |
| | | var usernameBtn = new Button |
| | | { |
| | | Text = user.MembershipName, |
| | | Text = user.UserName, |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | | Width = Application.GetRealWidth(600), |
| | | Height = Application.GetRealHeight(130), |
| | | Tag = Send.LinkageventLockList[i], |
| | | Tag = Send.LockList[i], |
| | | }; |
| | | userRow.AddChidren(usernameBtn); |
| | | |
| | |
| | | /// </summary> |
| | | /// <param name="membershipIfon">触发源列表</param> |
| | | /// <param name="userName">用户名字</param> |
| | | void SelectedUserID(List<Send.LockMode> membershipIfon, string userName) { |
| | | void SelectedUserID(List<Send.UnlockingMode> membershipIfon, string userName) { |
| | | |
| | | var flMain = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicViewBackgroundColor }; |
| | | this.AddChidren(flMain); |
| | |
| | | Width = Application.GetRealWidth(600), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = ZigbeeColor.Current.LogicBtnNotSelectedColor, |
| | | Text = userIdmode.ModeName, |
| | | }; |
| | | doorlockRow.AddChidren(doorlockBtn); |
| | | //(0按键/3卡/15指纹) |
| | | switch (userIdmode.OpenMode.ToString()) |
| | | { |
| | | case "0": |
| | | { |
| | | doorlockBtn.Text = Language.StringByID(MyInternationalizationString.lockpassword); |
| | | } |
| | | break; |
| | | case "3": |
| | | { |
| | | doorlockBtn.Text = Language.StringByID(MyInternationalizationString.ic); |
| | | } |
| | | break; |
| | | case "15": |
| | | { |
| | | doorlockBtn.Text = Language.StringByID(MyInternationalizationString.fingerprint); |
| | | } |
| | | break; |
| | | |
| | | } |
| | | //switch (userIdmode.OpenMode.ToString()) |
| | | //{ |
| | | // case "0": |
| | | // { |
| | | // doorlockBtn.Text = Language.StringByID(MyInternationalizationString.lockpassword); |
| | | // } |
| | | // break; |
| | | // case "3": |
| | | // { |
| | | // doorlockBtn.Text = Language.StringByID(MyInternationalizationString.ic); |
| | | // } |
| | | // break; |
| | | // case "15": |
| | | // { |
| | | // doorlockBtn.Text = Language.StringByID(MyInternationalizationString.fingerprint); |
| | | // } |
| | | // break; |
| | | //} |
| | | |
| | | |
| | | var doorlockSelected = new Button |