From 01c8b9a4753296ddd93da2a155bf4deb772481d9 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 22 七月 2022 17:47:59 +0800
Subject: [PATCH] 更新

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

diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
index 38b98be..1482e07 100644
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -423,6 +423,31 @@
         /// </summary>
         [Newtonsoft.Json.JsonIgnore]
         public string lastState = "";
+        /// <summary>
+        /// 鑾峰彇鐘舵�佹樉绀烘枃鏈�
+        /// </summary>
+        /// <returns></returns>
+        public string GetLastStateText()
+        {
+            var text = "";
+            switch (spk)
+            {
+                case SPK.HvacCac:
+                    switch (GetAttrState(FunctionAttributeKey.Mode))
+                    {
+                        case "cool":
+                            text = Language.StringByID(StringId.Cool);
+                            break;
+                        case "heat":
+                            text = Language.StringByID(StringId.Heat);
+                            break;
+                    }
+
+                    break;
+                    
+            }
+            return text;
+        }
 
         FunctionAttributes _trait_on_off;
         [Newtonsoft.Json.JsonIgnore]

--
Gitblit v1.8.0