| | |
| | | return Functions.FindAll((obj) => spkList.Contains(obj.spk)); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 红外宝列表 |
| | | /// </summary> |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 可视对讲列表 |
| | | /// 可视对讲列表,当为null或size为0则不显示可视对讲icon |
| | | /// </summary> |
| | | public UI.UI2.FuntionControlView.Video.VideoClouds videoIntercom; |
| | | // public UI.UI2.FuntionControlView.Video.VideoClouds videoIntercom; |
| | | public List<UI.UI2.FuntionControlView.Video.Video> videoIntercom = new List<UI.UI2.FuntionControlView.Video.Video>(); |
| | | |
| | | /// <summary> |
| | | /// 场景列表 |
| | | /// </summary> |
| | | public List<Scene> scenes = new List<Scene>(); |
| | | |
| | | /// <summary> |
| | | /// 安防列表 |
| | | /// </summary> |
| | | public List<Security> securities = new List<Security>(); |
| | | |
| | | /// <summary> |
| | | /// 加载功能列表 |
| | |
| | | } |
| | | Functions.Add(tempFunction); |
| | | } |
| | | else if (filePath.StartsWith("SceneData_")) |
| | | if (filePath.StartsWith("SceneData_")) |
| | | { |
| | | var sceneDataBytes = FileUtlis.Files.ReadFile(filePath); |
| | | var sceneDataString = System.Text.Encoding.UTF8.GetString(sceneDataBytes); |
| | | var tempScene = Newtonsoft.Json.JsonConvert.DeserializeObject<Scene>(sceneDataString); |
| | | List.scenes.Add(tempScene); |
| | | } |
| | | else if (filePath.StartsWith("SecurityData_")) |
| | | { |
| | | var dataBytes = FileUtlis.Files.ReadFile(filePath); |
| | | var dataString = System.Text.Encoding.UTF8.GetString(dataBytes); |
| | | var temp = Newtonsoft.Json.JsonConvert.DeserializeObject<Security>(dataString); |
| | | if (temp == null) |
| | | { |
| | | MainPage.Log("null"); |
| | | FileUtlis.Files.DeleteFile(filePath); |
| | | return; |
| | | } |
| | | if (checkRepeat == true) |
| | | { |
| | | //检测重复 |
| | | for (int i = 0; i < securities.Count; i++) |
| | | { |
| | | if (securities[i].sid == temp.sid) |
| | | { |
| | | //先移除掉再加 |
| | | securities.RemoveAt(i); |
| | | securities.Add(temp); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | securities.Add(temp); |
| | | } |
| | | } |
| | | |
| | |
| | | List.scenes.Remove(scene); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 删除本地功能及文件 |
| | | /// </summary> |
| | |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | |
| | | #region 场景相关 |
| | | /// <summary> |
| | | /// 添加场景 |