| | |
| | | } |
| | | |
| | | bool lockReadFunctionStatus = false; |
| | | |
| | | /// <summary> |
| | | /// 读取第三方设备状态 |
| | | /// </summary> |
| | | public void Read3tyFunctionStatus() |
| | | { |
| | | //读取涂鸦设备状态 |
| | | if (GetDeviceFunctionList(SPK.BrandType.Tuya).Count > 0) |
| | | { |
| | | var page = new List<string>(); |
| | | int count = 0; |
| | | foreach (var function in GetDeviceFunctionList(SPK.BrandType.Tuya)) |
| | | { |
| | | page.Add(function.deviceId); |
| | | count++; |
| | | if (count > 9) |
| | | { |
| | | DriverLayer.Control.Ins.ReadFunctionsInfo(page); |
| | | page.Clear(); |
| | | count = 0; |
| | | } |
| | | } |
| | | DriverLayer.Control.Ins.ReadFunctionsInfo(page); |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 读取全部功能的状态 |
| | | /// </summary> |
| | |
| | | lockReadFunctionStatus = true; |
| | | try |
| | | { |
| | | //读取涂鸦设备状态 |
| | | if (GetDeviceFunctionList(SPK.BrandType.Tuya).Count > 0) |
| | | { |
| | | var page = new List<string>(); |
| | | int count = 0; |
| | | foreach (var function in GetDeviceFunctionList(SPK.BrandType.Tuya)) |
| | | { |
| | | page.Add(function.deviceId); |
| | | count++; |
| | | if (count > 9) |
| | | { |
| | | DriverLayer.Control.Ins.ReadFunctionsInfo(page); |
| | | page.Clear(); |
| | | count = 0; |
| | | } |
| | | } |
| | | DriverLayer.Control.Ins.ReadFunctionsInfo(page); |
| | | } |
| | | Read3tyFunctionStatus(); |
| | | |
| | | if (DriverLayer.Control.Ins.IsRemote) |
| | | { |