From 0726154a7663e206e289e62f3f3fd7da4137a361 Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期四, 12 十月 2023 13:51:36 +0800
Subject: [PATCH] Merge branch 'Dev-Branch' into wjc

---
 HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs |   29 ++++++++++++++++++++++++++---
 1 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
index 62dc7d0..440e8f2 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
@@ -193,10 +193,33 @@
                         }
                         else
                         {
-                            var isHasColorful = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Colorful);
-                            if (isHasColorful != null)
+                            if (sceneFunction.localFunction.spk == SPK.ElectricalTvHisense)
                             {
-                                sceneFunction.status.Remove(isHasColorful);
+                                for(int i = 0;i< sceneFunction.status.Count;i++)
+                                {
+                                    var tvState = sceneFunction.status[i];
+                                    if (tvState.key == FunctionAttributeKey.OnOff)
+                                    {
+                                        tvState.key = "wol";
+                                        tvState.value = "on";
+                                    }
+                                    else
+                                    {
+                                        if(string.IsNullOrEmpty( tvState.value))
+                                        {
+                                            sceneFunction.status.RemoveAt(i);
+                                            i--;
+                                        }
+                                    }
+                                }
+                            }
+                            else
+                            {
+                                var isHasColorful = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Colorful);
+                                if (isHasColorful != null)
+                                {
+                                    sceneFunction.status.Remove(isHasColorful);
+                                }
                             }
                         }
                     }

--
Gitblit v1.8.0