From 312f9ece8d4a46d8989187730fc7f5c7fc36cfb5 Mon Sep 17 00:00:00 2001
From: wxr <wxr@hdlchina.com.cn>
Date: 星期五, 12 七月 2024 15:20:52 +0800
Subject: [PATCH] Update SplashActivity.cs
---
HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs | 72 ++++++++++++++++++++----------------
1 files changed, 40 insertions(+), 32 deletions(-)
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
index 4713ac2..e0f5a35 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
@@ -32,7 +32,7 @@
bodyView = this;
scene = s;
- sceneFunction = fc;//.localFunction.ConvertSceneFunction();
+ sceneFunction = fc.localFunction.ConvertSceneFunction();
foreach (var ll in sceneFunction.status)
{
try
@@ -53,12 +53,14 @@
{
bodyView.BackgroundColor = CSS_Color.BackgroundColor;
- new TopViewDiv(bodyView, sceneFunction.localFunction.name).LoadTopView();
+ var topView = new TopViewDiv(bodyView, sceneFunction.localFunction.name);
+ topView.maginY = 10;
+ topView.LoadTopView();
contentView = new VerticalScrolViewLayout()
{
- Y = Application.GetRealHeight(64),
- Height = Application.GetRealHeight(520),
+ Y = Application.GetRealHeight(64 + 10),
+ Height = Application.GetRealHeight(510),
ScrollEnabled = false,
};
bodyView.AddChidren(contentView);
@@ -193,33 +195,10 @@
}
else
{
- if (sceneFunction.localFunction.spk == SPK.ElectricalTvHisense)
+ var isHasColorful = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.Colorful);
+ if (isHasColorful != null)
{
- 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);
- }
+ sceneFunction.status.Remove(isHasColorful);
}
}
}
@@ -241,9 +220,38 @@
{
scene.functions.Remove(temp);
}
- //else
- {
scene.functions.Insert(0, sceneFunction);
+
+
+ if (sceneFunction.localFunction.spk == SPK.MusicStandard)
+ {
+ for (var i = 0; i < sceneFunction.status.Count;)
+ {
+ var ddd = sceneFunction.status[i];
+ if (string.IsNullOrEmpty(ddd.value))
+ {
+ sceneFunction.status.Remove(ddd);
+ continue;
+ }
+ i++;
+ }
+
+ if (sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.PlaylistName) == null)
+ {
+ if (isOnStatus)
+ {
+ var songNameStatus = sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.SongName);
+ {
+ if (songNameStatus != null)
+ {
+ if (string.IsNullOrEmpty(songNameStatus.value))
+ {
+ sceneFunction.status.Add(new SceneFunctionStatus() { key = FunctionAttributeKey.PlaylistName, value = "hdl_special" });
+ }
+ }
+ }
+ }
+ }
}
if (!string.IsNullOrEmpty(scene.userSceneId))
{
--
Gitblit v1.8.0