| | |
| | | public class FunctionList |
| | | { |
| | | static FunctionList _FunctionList; |
| | | |
| | | public static void ClearData() |
| | | { |
| | | try |
| | | { |
| | | _FunctionList.Clear(); |
| | | _FunctionList = null; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MainPage.Log($"清理FunctionList异常:{ex.Message}"); |
| | | _FunctionList = null; |
| | | } |
| | | } |
| | | |
| | | public static FunctionList List |
| | | { |
| | | get |
| | |
| | | /// 功能列表 |
| | | /// </summary> |
| | | public List<Function> Functions = new List<Function>(); |
| | | /// <summary> |
| | | /// 机械臂列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<Function> GetMechanicalArmList() |
| | | { |
| | | return Functions.FindAll((obj) => obj.spk == SPK.MechanicalArm); |
| | | } |
| | | |
| | | List<Function> _IpCamImou; |
| | | /// <summary> |
| | | /// 获取摄像头列表 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public List<Function> GetIpCamImouList() |
| | | { |
| | | if (_IpCamImou == null) |
| | | { |
| | | _IpCamImou = Functions.FindAll((obj) => obj.spk == SPK.IpCam_Imou); |
| | | } |
| | | return _IpCamImou; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 绿建科技系统 |
| | |
| | | switch (brandType) |
| | | { |
| | | case SPK.BrandType.Hdl: |
| | | foreach (var function in Functions) |
| | | try |
| | | { |
| | | if (!SPK.Get3tySpk(SPK.BrandType.All3tyBrand).Contains(function.spk)) |
| | | foreach (var function in Functions) |
| | | { |
| | | resultFunctions.Add(function); |
| | | if (!SPK.Get3tySpk(SPK.BrandType.All3tyBrand).Contains(function.spk)) |
| | | { |
| | | resultFunctions.Add(function); |
| | | } |
| | | } |
| | | } |
| | | catch { } |
| | | break; |
| | | |
| | | case SPK.BrandType.Tuya: |
| | | lock (Functions) |
| | | { |
| | | foreach (var function in Functions) |
| | | try |
| | | { |
| | | if (SPK.Get3tySpk(SPK.BrandType.Tuya).Contains(function.spk)) |
| | | foreach (var function in Functions) |
| | | { |
| | | resultFunctions.Add(function); |
| | | if (SPK.Get3tySpk(SPK.BrandType.Tuya).Contains(function.spk)) |
| | | { |
| | | resultFunctions.Add(function); |
| | | } |
| | | } |
| | | } |
| | | catch { } |
| | | } |
| | | break; |
| | | } |
| | |
| | | |
| | | /// <summary> |
| | | /// 删除场景 |
| | | /// todo |
| | | /// </summary> |
| | | public void DeleteScene(Scene scene,bool upSevser) |
| | | { |