| | |
| | | { |
| | | return; |
| | | } |
| | | if ((common as Rollershade).DeviceStatusReport.CluterID == 258) |
| | | if (common.DeviceStatusReport.CluterID == 258) |
| | | { |
| | | if ((common as Rollershade).DeviceStatusReport.AttriBute[0].AttributeId == 8) |
| | | if (common.DeviceStatusReport.AttriBute[0].AttributeId == 8) |
| | | { |
| | | //窗帘百分比 |
| | | var rollerShade = deviceUI.CommonDevice as Rollershade; |
| | | rollerShade.DeviceStatusReport = (common as Rollershade).DeviceStatusReport; |
| | | rollerShade.WcdCurrentPositionLiftPercentage = (common as Rollershade).DeviceStatusReport.AttriBute[0].AttriButeData; |
| | | rollerShade.DeviceStatusReport = common.DeviceStatusReport; |
| | | rollerShade.WcdCurrentPositionLiftPercentage = common.DeviceStatusReport.AttriBute[0].AttriButeData; |
| | | SeekBar.Progress = rollerShade.WcdCurrentPositionLiftPercentage; |
| | | seekBarTitle.Text = $"{SeekBar.Progress} %"; |
| | | rollerShade.LastDateTime = DateTime.Now; |
| | | } |
| | | else if ((common as Rollershade).DeviceStatusReport.AttriBute[0].AttributeId == 0) |
| | | else if (common.DeviceStatusReport.AttriBute[0].AttributeId == 0) |
| | | { |
| | | //窗帘类型 |
| | | var rollerShade = deviceUI.CommonDevice as Rollershade; |
| | | rollerShade.DeviceStatusReport = (common as Rollershade).DeviceStatusReport; |
| | | rollerShade.WcdType = (common as Rollershade).DeviceStatusReport.AttriBute[0].AttriButeData; |
| | | rollerShade.DeviceStatusReport = common.DeviceStatusReport; |
| | | rollerShade.WcdType = common.DeviceStatusReport.AttriBute[0].AttriButeData; |
| | | rollerShade.LastDateTime = DateTime.Now; |
| | | } |
| | | } |
| | | //***新改***设备状态上报中,当CluterID=3,证明设备在线,直接标记 |
| | | else if ((common as Rollershade).DeviceStatusReport.CluterID == 3) |
| | | else if (common.DeviceStatusReport.CluterID == 3) |
| | | { |
| | | var rollerShade = deviceUI.CommonDevice as Rollershade; |
| | | rollerShade.IsOnline = 1; |
| | |
| | | return; |
| | | } |
| | | var rollerShade = deviceUI.CommonDevice as Rollershade; |
| | | rollerShade.IsOnline = (common as Rollershade).IsOnline; |
| | | rollerShade.IsOnline = common.IsOnline; |
| | | rollerShadeIMG.IsSelected = rollerShade.IsOnline == 1; |
| | | rollerShade.LastDateTime = DateTime.Now; |
| | | } |