From d07d62be7111d78b2aaa44c9cdee23a7d22b4dda Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期二, 22 十二月 2020 10:38:15 +0800
Subject: [PATCH] 20201222-1

---
 HDL_ON/Entity/Function/Light.cs |   35 +++++++++++++++++++++++++++++++++++
 1 files changed, 35 insertions(+), 0 deletions(-)

diff --git a/HDL_ON/Entity/Function/Light.cs b/HDL_ON/Entity/Function/Light.cs
old mode 100755
new mode 100644
index c3ae4b8..f9843cb
--- a/HDL_ON/Entity/Function/Light.cs
+++ b/HDL_ON/Entity/Function/Light.cs
@@ -153,6 +153,8 @@
                 }
             }
         }
+
+        #region RGB
         /// <summary>
         /// 鑾峰彇rgb棰滆壊
         /// </summary>
@@ -227,5 +229,38 @@
                 return blueColor;
             }
         }
+        #endregion
+
+        #region CCT
+        FunctionAttributes attr_CCT;
+        /// <summary>
+        /// 鑹叉俯
+        /// </summary>
+        [Newtonsoft.Json.JsonIgnore]
+        public FunctionAttributes Attr_CCT
+        {
+            get
+            {
+                if(attr_CCT == null)
+                {
+                    attr_CCT = attributes.Find((obj) => obj.key == FunctionAttributeKey.CCT);
+                    if(attr_CCT== null)
+                    {
+                        attr_CCT = new FunctionAttributes()
+                        {
+                            key = FunctionAttributeKey.CCT,
+                            value = new List<string> (),
+                            max = 6500,
+                            min = 2700,
+                            curValue = 2700
+                        };
+                    }
+                }
+                var result = 2700;
+                int.TryParse(attr_CCT.curValue.ToString(), out result);
+                return attr_CCT;
+            }
+        }
+        #endregion
     }
 }

--
Gitblit v1.8.0