From 2d5cd35af7437ad4015d38594d8c721dc6166b11 Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期二, 29 八月 2023 09:22:38 +0800 Subject: [PATCH] Merge branch 'wjc' of http://59.41.255.150:6688/r/~wxr/OnPro into wjc --- HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs | 34 +++++++++++++++++++++++++--------- 1 files changed, 25 insertions(+), 9 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs index 74a8d34..4373932 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SceneEditPage.cs @@ -436,13 +436,16 @@ if (pack.Data != null) { var sceneList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Scene>>(pack.Data.ToString()); - var tempScene = sceneList.Find((obj) => obj.userSceneId == scene.userSceneId); - if (tempScene != null) + if (sceneList != null) { - scene.name = tempScene.name; - scene.delay = tempScene.delay; - scene.roomIds = tempScene.roomIds; - scene.functions = tempScene.functions; + var tempScene = sceneList.Find((obj) => obj.userSceneId == scene.userSceneId); + if (tempScene != null) + { + scene.name = tempScene.name; + scene.delay = tempScene.delay; + scene.roomIds = tempScene.roomIds; + scene.functions = tempScene.functions; + } } } Application.RunOnMainThread(() => @@ -490,9 +493,22 @@ //灏唖pk瀹炰綋閲岄潰鐨刴in max鍊兼斁鍏ュ満鏅姛鑳藉疄浣撻噷锛岃涓嶇劧鏁版嵁浼氫涪澶� 2022-06-21 16:06:45 foreach (var tt in scenefunction.status) { - tt.min = scenefunction.localFunction.GetAttribute(tt.key).min; - tt.max = scenefunction.localFunction.GetAttribute(tt.key).max; - tt.valueList = scenefunction.localFunction.GetAttribute(tt.key).value; + var attr = scenefunction.localFunction.GetAttribute(tt.key); + if(attr == null) + { + continue; + } + tt.min = attr.min; + tt.max = attr.max; + tt.valueList = attr.value; + if(tt.key == FunctionAttributeKey.SetTemp) + { + var tempType = scenefunction.localFunction.GetAttribute(FunctionAttributeKey.TempType); + if(tempType != null) + { + tt.UintString = tempType.unit; + } + } } }catch(Exception ex) { -- Gitblit v1.8.0