From f4f4c1c28f6c0fb892145819f444c2c0f95a80f0 Mon Sep 17 00:00:00 2001
From: hxb <hxb@hdlchina.com.cn>
Date: 星期二, 13 七月 2021 11:05:02 +0800
Subject: [PATCH] 萤石功能测试完成

---
 HDL_ON/Entity/Function/Scene.cs |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/HDL_ON/Entity/Function/Scene.cs b/HDL_ON/Entity/Function/Scene.cs
index 2f73b07..e4607ae 100644
--- a/HDL_ON/Entity/Function/Scene.cs
+++ b/HDL_ON/Entity/Function/Scene.cs
@@ -67,7 +67,7 @@
         /// </summary>
         public string delay = "0";
         /// <summary>
-        /// 鍦烘櫙鐨勬渶濂戒竴娆℃墽琛屾椂闂�
+        /// 鍦烘櫙鐨勬渶鍚庝竴娆℃墽琛屾椂闂�
         /// </summary>
         public string LastExecutionTime = "";
 
@@ -346,7 +346,21 @@
         /// </summary>
         public string GetDelayText()
         {
+            var delayInt = 0;
+            int.TryParse(delay,out delayInt);
+            if(delayInt == 0)
+            {
+                return Language.StringByID(StringId.NoDelay);
+            }
             string text = "";
+            if (delayInt > 60)
+            {
+                text = (delayInt / 60) + Language.StringByID(StringId.m) + (delayInt % 60) + Language.StringByID(StringId.s);
+            }else
+            {
+                text = delayInt + Language.StringByID(StringId.s);
+            }
+            return text;
             switch (delay)
             {
                 case "0":
@@ -431,7 +445,9 @@
                 if (sfs.key == FunctionAttributeKey.OnOff)
                 {
                     if (sfs.value == "off")
+                    {
                         return Language.StringByID(StringId.Close);
+                    }
                 }
             }
             sceneFunctionInfo += Language.StringByID(StringId.Open) + " ";

--
Gitblit v1.8.0