From d1af1b8337591363e60c286348501a841138dbb3 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期四, 24 十二月 2020 16:00:09 +0800
Subject: [PATCH] 20201224-3
---
HDL_ON/Common/ApiUtlis.cs | 44 ++++++++++++++++++++++----------------------
1 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/HDL_ON/Common/ApiUtlis.cs b/HDL_ON/Common/ApiUtlis.cs
index c29314c..aaded7a 100644
--- a/HDL_ON/Common/ApiUtlis.cs
+++ b/HDL_ON/Common/ApiUtlis.cs
@@ -159,8 +159,8 @@
{
deviceList = new DevcieApiPack();
}
- if (FunctionList.List.GetDeviceFunctionList().Count > 0)
- {
+ if (FunctionList.List.GetDeviceFunctionList().Count > 0)
+ {
for (int i = 0; i < FunctionList.List.GetDeviceFunctionList().Count;)
{
var localFunction = FunctionList.List.GetDeviceFunctionList()[i];
@@ -191,12 +191,12 @@
deviceList.list.Remove(newFunction);//鎿嶄綔瀹岀殑鏁版嵁娓呯悊鎺夛紝鍓╀笅鐨勫氨鏄柊澧炵殑鍔熻兘
}
}
- //澶勭悊鍓╀笅鐨勬柊澧炲姛鑳�
- foreach (var newFunction in deviceList.list)
- {
- newFunction.SaveFunctionFile();
- FunctionList.List.IniFunctionList(newFunction.savePath);
- }
+ }
+ //澶勭悊鍓╀笅鐨勬柊澧炲姛鑳�
+ foreach (var newFunction in deviceList.list)
+ {
+ newFunction.SaveFunctionFile();
+ FunctionList.List.IniFunctionList(newFunction.savePath);
}
endTime = DateTime.Now.AddSeconds(5);
}
@@ -216,15 +216,15 @@
{
sceneList = new List<Scene>();
}
- for (int i = 0; i < FunctionList.List.scenes.Count;)
+ for (int i = 0; i < FunctionList.List.scenes.Count;)
+ {
+ var localScene = FunctionList.List.scenes[i];
+ if (localScene == null)
{
- var localScene = FunctionList.List.scenes[i];
- if (localScene == null)
- {
- FunctionList.List.scenes.Remove(localScene);
- continue;
- }
- var newScene = sceneList.Find((obj) => obj.userSceneId == localScene.userSceneId);
+ FunctionList.List.scenes.Remove(localScene);
+ continue;
+ }
+ var newScene = sceneList.Find((obj) => obj.userSceneId == localScene.userSceneId);
if (newScene == null)//濡傛灉浜戠鏈�鏂版暟鎹病鏈夎鏉℃暟鎹紝鍒欐湰鍦伴渶瑕佸垹鎺夎鏁版嵁璁板綍
{
FunctionList.List.DeleteScene(localScene, false);
@@ -242,12 +242,12 @@
}
sceneList.Remove(newScene);//鎿嶄綔瀹岀殑鏁版嵁娓呯悊鎺夛紝鍓╀笅鐨勫氨鏄柊澧炵殑鍔熻兘
}
- //澶勭悊鍓╀笅鐨勬柊澧炲姛鑳�
- foreach (var tempScene in sceneList)
- {
- tempScene.SaveSceneFile();
- FunctionList.List.scenes.Add(tempScene);
- }
+ }
+ //澶勭悊鍓╀笅鐨勬柊澧炲姛鑳�
+ foreach (var tempScene in sceneList)
+ {
+ tempScene.SaveSceneFile();
+ FunctionList.List.scenes.Add(tempScene);
}
//濡傛灉鏄竴绔彛闇�瑕佹彁鍓嶄笅杞藉満鏅暟鎹紝鍚﹀垯鎺у埗涓嶄簡涓�绔彛鍦烘櫙
if (DB_ResidenceData.Instance.GatewayType == 0)
--
Gitblit v1.8.0