From 3e7c0a6deda128e639abfa3b8ed9377dbd017526 Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期五, 11 十二月 2020 17:47:24 +0800 Subject: [PATCH] 2020-12-11-4 --- HDL_ON/Entity/FunctionList.cs | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/HDL_ON/Entity/FunctionList.cs b/HDL_ON/Entity/FunctionList.cs index 37990d5..af78a3a 100644 --- a/HDL_ON/Entity/FunctionList.cs +++ b/HDL_ON/Entity/FunctionList.cs @@ -193,7 +193,7 @@ /// </summary> public List<Function> GetAllDeviceFunctionList() { - //if (deviceFunctionList == null) + if (deviceFunctionList == null || deviceFunctionList.Count == 0) { deviceFunctionList = new List<Function>(); deviceFunctionList.AddRange(aCs); @@ -372,7 +372,7 @@ //{ IsBackground = true }.Start(); for (int i =0;i < List.GetAllDeviceFunctionList().Count;) { - var localFunction = List.GetAllDeviceFunctionList()[0]; + var localFunction = List.GetAllDeviceFunctionList()[i]; var newFunction = deviceList.list.Find((obj) => obj.deviceId == localFunction.deviceId); if (newFunction == null)//濡傛灉浜戠鏈�鏂版暟鎹病鏈夎鏉℃暟鎹紝鍒欐湰鍦伴渶瑕佸垹鎺夎鏁版嵁璁板綍 { @@ -436,6 +436,11 @@ for(int i=0;i<List.scenes.Count;) { var localScene = List.scenes[i]; + if (localScene == null) + { + List.scenes.Remove(localScene); + continue; + } var newScene = sceneList.Find((obj) => obj.userSceneId == localScene.userSceneId); if (newScene == null)//濡傛灉浜戠鏈�鏂版暟鎹病鏈夎鏉℃暟鎹紝鍒欐湰鍦伴渶瑕佸垹鎺夎鏁版嵁璁板綍 { -- Gitblit v1.8.0