mac
2023-10-17 5ec581e5d37b108fc9d59e89afd8e94e21b32080
HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
@@ -79,13 +79,13 @@
            if (sceneFunction.localFunction.spk == SPK.LightRGB || sceneFunction.localFunction.spk == SPK.GroupControl)
            {
                //var colorfulStatus = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Colorful);
                //if (colorfulStatus != null)
                //{
                //    isColorful = true;
                //    LoadColorfulRow(colorfulStatus);
                //    isColorful = colorfulStatus.value == "on";
                //}
                var colorfulStatus = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Colorful);
                if (colorfulStatus != null)
                {
                    isColorful = true;
                    LoadColorfulRow(colorfulStatus);
                    isColorful = colorfulStatus.value == "on";
                }
            }
            foreach (var attr in sceneFunction.status)
            {
@@ -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);
                                }
                            }
                        }
                    }
@@ -555,7 +578,7 @@
                            {
                                btnFunctionText.Text = song.name;
                                sceneStatus.value = song.name;
                                //追加控制属性
                                //追加属性
                                var oldList = new List<SceneFunctionStatus>();
                                for (int i = 0; i < sceneFunction.status.Count; i++)
                                {
@@ -568,7 +591,7 @@
                                    }
                                    else if (status.key == FunctionAttributeKey.Url)
                                    {
                                        //存在url就一起发送过去
                                        //存在url就一起发过去
                                        if (!string.IsNullOrEmpty(song.url))
                                        {
                                            //控制需要(界面不需要显示)