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/Entity/Function/Scene.cs |   60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 57 insertions(+), 3 deletions(-)

diff --git a/HDL_ON/Entity/Function/Scene.cs b/HDL_ON/Entity/Function/Scene.cs
index fdf195b..c2844b4 100644
--- a/HDL_ON/Entity/Function/Scene.cs
+++ b/HDL_ON/Entity/Function/Scene.cs
@@ -151,6 +151,7 @@
         /// 閰嶅悎璞嗚眴淇敼浜戠鏁版嵁
         /// 璋冭瘯瀹濄�乷n pro鍜屽钩鍙板搴�
         /// </summary>
+        [Newtonsoft.Json.JsonIgnore]
         public List<SceneImageInfo> OssSceneImages = new List<SceneImageInfo>()
         {
             new SceneImageInfo
@@ -430,6 +431,7 @@
                 {
                     var ssd = System.Text.Encoding.UTF8.GetBytes(Newtonsoft.Json.JsonConvert.SerializeObject(this));
                     Common.FileUtlis.Files.WriteFileByBytes(savePath, ssd);
+                    return revPack.Code;
                 }
                 var scenes = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Scene>>(revPack.Data.ToString());
                 var tempScene = scenes.Find((obj) => obj.sid == sid);
@@ -596,8 +598,8 @@
             }
             if (tempState != null)
             {
-                sceneFunctionInfo += tempState.GetValueText() + " ";
-                sceneFunctionInfo += tempState.GetUintString();
+                sceneFunctionInfo += tempState.GetValueText();
+                sceneFunctionInfo += tempState.GetUintString() + " ";
             }
             if (fanState != null)
             {
@@ -629,6 +631,32 @@
             if (perAngle != null)
             {
                 sceneFunctionInfo += " " + perAngle.value + "掳";
+            }
+
+            var perSetVolume = status.Find((obj) => obj.key == FunctionAttributeKey.SetVolume);
+            if (perSetVolume != null)
+            {
+                sceneFunctionInfo += " " + perSetVolume.value;
+            }
+
+            var perSignal = status.Find((obj) => obj.key == FunctionAttributeKey.Signal);
+            if (perSignal != null)
+            {
+                var p = new HDL_ON.UI.UI2.Intelligence.Automation.PublicInterface();
+                string key = p.GetKey(p.GetHisenseSignalSourceDic(), perSignal.value);
+                sceneFunctionInfo += " " + key;
+            }
+
+            var perVolume =status.Find((obj) => obj.key == FunctionAttributeKey.Volume);
+            if (perVolume != null)
+            {
+                sceneFunctionInfo += " " + perVolume.value;
+            }
+
+            var perSongName =status.Find((obj) => obj.key == FunctionAttributeKey.SongName);
+            if (perSongName != null)
+            {
+                sceneFunctionInfo += " " + perSongName.value;
             }
             return sceneFunctionInfo;
         }
@@ -704,6 +732,18 @@
                 case "security":
                     text = Language.StringByID(StringId.DeploymentStatus);
                     break;
+                case FunctionAttributeKey.SetVolume:
+                    text = Language.StringByID(StringId.yinliang);
+                    break;
+                case FunctionAttributeKey.Signal:
+                    text = Language.StringByID(StringId.xinhaoyuan);
+                    break;
+                case FunctionAttributeKey.Volume:
+                    text = Language.StringByID(StringId.yinliang);
+                    break;
+                case FunctionAttributeKey.SongName:
+                    text = Language.StringByID(StringId.tishiyin);
+                    break;
             }
             return text;
         }
@@ -715,7 +755,7 @@
         /// </summary>
         public string GetUintString()
         {
-            if (!string.IsNullOrEmpty(UintString) && UintString!= "{}")
+            if (!string.IsNullOrEmpty(UintString) && UintString != "{}")
             {
                 return UintString;
             }
@@ -849,6 +889,20 @@
                 case "auto":
                     text = Language.StringByID(StringId.Auto);
                     break;
+                case FunctionAttributeKey.Signal:
+                    var p = new UI.UI2.Intelligence.Automation.PublicInterface();
+                    var dic = p.GetHisenseSignalSourceDic();
+                    text = p.GetKey(dic, value);
+                    break;
+                case FunctionAttributeKey.SetVolume:
+                    text = value;
+                    break;
+                case FunctionAttributeKey.Volume:
+                    text = value;
+                    break;
+                case FunctionAttributeKey.SongName:
+                    text = value;
+                    break;
             }
             return text;
         }

--
Gitblit v1.8.0