From 300a5d5370d10d97eb5dfdfa43bb0156c15d23e3 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 03 一月 2024 17:36:15 +0800
Subject: [PATCH] packet类复原
---
HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/GroupControl.cs | 44 +++++++++++++++++++++++++++++++++++---------
1 files changed, 35 insertions(+), 9 deletions(-)
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/GroupControl.cs b/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/GroupControl.cs
index 30fbc37..6a36845 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/GroupControl.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/GroupControl.cs
@@ -11,7 +11,7 @@
{
public GroupControl()
{
- spk = "GroupControl";
+ spk = "groupControl";
}
/// <summary>
/// 缇ゆ帶ID
@@ -26,7 +26,7 @@
/// </summary>
public string NewGroupControlSid()
{
- string sceneId = "";
+ string Id = "";
try
{
string sOidBeginsWith = "000101";//鍘傚晢 + 閫氳鏂瑰紡
@@ -53,23 +53,23 @@
//sTimeSpan = "00000000";
}
- sceneId = sOidBeginsWith + sTimeSpan;
+ Id = sOidBeginsWith + sTimeSpan;
- sceneId += "AA";
- sceneId += "AA01";
+ Id += "AA";
+ Id += "AA01";
int maxId = 1;
Random random = new Random(Guid.NewGuid().GetHashCode());
maxId = random.Next(10);
- sceneId += (maxId + 1).ToString("X4");
- sceneId += "0000";
+ Id += (maxId + 1).ToString("X4");
+ Id += "0000";
}
catch
{
- return sceneId;
+ return Id;
}
- return sceneId;
+ return Id;
}
/// <summary>
/// 缇ゆ帶鍚嶇О
@@ -161,6 +161,32 @@
MainPage.Log($"缇ゆ帶鎺у埗澶辫触: {ex.Message}");
}
}
+
+
+ public new List<FunctionAttributes> attributes {
+ get
+ {
+ var list = new List<FunctionAttributes>();
+
+ foreach (var temp in sids)
+ {
+ var light = FunctionList.List.GetLightList().Find((obj) => obj.sid == temp.sid);
+ if (light != null)
+ {
+ foreach(var attr in light.attributes)
+ {
+ if(list.Find((obj)=>obj.key == attr.key) == null)
+ {
+ list.Add(attr);
+ }
+ }
+ }
+
+ }
+
+ return list;
+ }
+ }
}
public class GroupControlFunction
--
Gitblit v1.8.0