From 489d3bd60ad7dc2fecb398b09cf4c52df16f0fc2 Mon Sep 17 00:00:00 2001
From: Davin <591807572@qq.com>
Date: 星期三, 26 七月 2023 15:55:30 +0800
Subject: [PATCH] Merge branch 'Dev-Branch' of http://59.41.255.150:6688/r/~wxr/OnPro into Dev-Branch

---
 HDL_ON/Entity/Function/Function.cs |   24 +++++++++++++++---------
 1 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
index 8f4f3c3..8e8602b 100644
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -803,25 +803,27 @@
             var list = new List<FunctionAttributes>();
             if (spk == SPK.GroupControl)
             {
-                var gc = FunctionList.List.groupControls.Find((obj) => obj.sid == sid);
-                if (gc != null)
+                lock (list)
                 {
-                    foreach (var temp in gc.sids)
+                    var gc = FunctionList.List.groupControls.Find((obj) => obj.sid == sid);
+                    if (gc != null)
                     {
-                        var light = FunctionList.List.GetLightList().Find((obj) => obj.sid == temp.sid);
-                        if (light != null)
+                        foreach (var temp in gc.sids)
                         {
-                            foreach (var attr in light.attributes)
+                            var light = FunctionList.List.GetLightList().Find((obj) => obj.sid == temp.sid);
+                            if (light != null)
                             {
-                                if (list.Find((obj) => obj.key == attr.key) == null)
+                                foreach (var attr in light.attributes)
                                 {
-                                    list.Add(attr);
+                                    if (list.Find((obj) => obj.key == attr.key) == null)
+                                    {
+                                        list.Add(attr);
+                                    }
                                 }
                             }
                         }
                     }
                 }
-
             }
             else
             {
@@ -1142,6 +1144,10 @@
         /// 褰撳墠鍊�
         /// </summary>
         public object curValue = new object();
+        /// <summary>
+        /// 灞炴�у崟浣�
+        /// </summary>
+        public string unit=string.Empty;
     }
 
     /// <summary>

--
Gitblit v1.8.0