| | |
| | | case DeviceType.DoorLock: |
| | | { |
| | | #region ------ |
| | | var doorlockifonlist = Send.ReadDoorLockIfon(common.DeviceAddr); |
| | | //var list = Send.ReadDoorLockIfon(common.DeviceAddr); |
| | | var doorlockifonlist = await Send.UserListIfon(common.DeviceAddr); |
| | | var pra = new UserCenter.MemberListInfoPra(); |
| | | string result = await UserCenter.UserCenterLogic.GetResponseDataByRequestHttps("ZigbeeUsers/GetSubAccountByDistributedMark", false, pra); |
| | | var listInfo = Newtonsoft.Json.JsonConvert.DeserializeObject<List<UserCenter.MemberInfoRes>>(result); |
| | |
| | | ///查找成员以及成员门锁触发源(1按键/3卡/15指纹) |
| | | if (doorlockifonlist[j].CloudAccountId == membershipifon.SubAccountDistributedMark) |
| | | { |
| | | membership.UserIdMode.Add(doorlockifonlist[j].UserIdMode); |
| | | membership.MembershipName = membershipifon.UserName; |
| | | var lockMode = new Send.LockMode(); |
| | | lockMode.UserId = doorlockifonlist[j].DoorLockLocalUserId; |
| | | lockMode.OpenMode = doorlockifonlist[j].OpenLockMode; |
| | | membership.UserIdMode.Add(lockMode); |
| | | membership.MembershipId = membershipifon.SubAccountDistributedMark; |
| | | if (string.IsNullOrEmpty(membershipifon.UserName)) |
| | | { |
| | | membership.MembershipName = membershipifon.Account; |
| | | } |
| | | else |
| | | { |
| | | membership.MembershipName = membershipifon.UserName; |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | if (membership.UserIdMode.Count != 0) |
| | | { |
| | | ///过滤掉重复数据; |
| | | var str = Send.UserList.Find((c) => { return c.MembershipId == membership.MembershipId; }); |
| | | var str = Send.UserList.Find((c) => { return c.MembershipId == membershipifon.SubAccountDistributedMark; }); |
| | | if (str == null) |
| | | { |
| | | Send.UserList.Add(membership); |
| | |
| | | memberList.Show(common); |
| | | } |
| | | break; |
| | | |
| | | case DeviceType.TemperatureSensor: |
| | | { |
| | | string current = Language.StringByID(MyInternationalizationString.current); |
| | |
| | | { |
| | | dictionary(deviceConditionsInfo, "AttriButeData1", horizontalSeekBarVol.Progress.ToString()); |
| | | |
| | | Btntemperaturevalue.Text = current+">" + horizontalSeekBarVol.Progress.ToString() + "℃"; |
| | | Btntemperaturevalue.Text = current + ">" + horizontalSeekBarVol.Progress.ToString() + "℃"; |
| | | |
| | | } |
| | | else |
| | | { |
| | | Btntemperaturevalue.Text = current+"<" + horizontalSeekBarVol.Progress.ToString() + "%"; |
| | | Btntemperaturevalue.Text = current + "<" + horizontalSeekBarVol.Progress.ToString() + "%"; |
| | | dictionary(deviceConditionsInfo, "AttriButeData1", horizontalSeekBarVol.Progress.ToString());//温度值 |
| | | } |
| | | }; |
| | |
| | | dictionary(deviceConditionsInfo, "Range", "0");//0大于AttriButeData1时触发动作 |
| | | dictionary(deviceConditionsInfo, "AttriButeData1", "0"); |
| | | dictionary(deviceConditionsInfo, "AttriButeData2", "0"); |
| | | Btntemperaturevalue.Text = current+">0℃"; |
| | | Btntemperaturevalue.Text = current + ">0℃"; |
| | | |
| | | } |
| | | else |
| | | { |
| | | Btntemperaturevalue.Text = current+"<0%"; |
| | | Btntemperaturevalue.Text = current + "<0%"; |
| | | dictionary(deviceConditionsInfo, "Cluster_ID", "1029"); |
| | | dictionary(deviceConditionsInfo, "AttriButeId", "0"); |
| | | dictionary(deviceConditionsInfo, "Range", "2");//2小于AttriButeData1时触发动作 |
| | |
| | | if (temperatureSensor.SensorDiv == 1) |
| | | { |
| | | |
| | | Btntemperaturevalue.Text = current+">" + devices["AttriButeData1"] + "℃"; |
| | | Btntemperaturevalue.Text = current + ">" + devices["AttriButeData1"] + "℃"; |
| | | |
| | | } |
| | | else |
| | | { |
| | | Btntemperaturevalue.Text = current+"<" + devices["AttriButeData1"] + "%"; |
| | | Btntemperaturevalue.Text = current + "<" + devices["AttriButeData1"] + "%"; |
| | | } |
| | | } |
| | | |