From fba7be989c27154db963cfce1ddd7b01d71e8b21 Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期五, 20 十月 2023 14:21:12 +0800
Subject: [PATCH] 2023年10月20日14:20:17

---
 HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs |   55 ++++++++++++++++++++++++++++---------------------------
 1 files changed, 28 insertions(+), 27 deletions(-)

diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
index 80db2e3..073fe47 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -489,7 +489,7 @@
                                         string value = this.GetKeyValue("people_status", dicList);
                                         if (string.IsNullOrEmpty(value))
                                         {
-                                            inputView.btnState.Text = inputCondition.hold_time + "s";
+                                            inputView.btnState.Text = LogicMethod.Current.getTimeStr(inputCondition.hold_time).Replace("0s","");
                                             break;
 
                                         }
@@ -502,8 +502,8 @@
                                         }
                                         if (!string.IsNullOrEmpty(inputCondition.hold_time) && int.Parse(inputCondition.hold_time) > 0)
                                         {
-
-                                            inputView.btnState.Text += "鎸佺画" + inputCondition.hold_time + "s";
+                                            int time = int.Parse(inputCondition.hold_time);
+                                            inputView.btnState.Text += "鎸佺画" + LogicMethod.Current.getTimeStr(inputCondition.hold_time).Replace("0s", "");
                                         }
 
 
@@ -2292,7 +2292,7 @@
                         foreach (var dic in dicList)
                         {
                             string value = dic["value"];
-                            if (value == "open")
+                            if (value == "on"|| value == "open")
                             {
                                 button1.Text = Language.StringByID(StringId.onLogic);
                             }
@@ -2893,29 +2893,30 @@
             string state = "";
             var minutes = timeValue / 60;
             var seconds = timeValue % 60;
-            if (minutes != 0)
-            {
-                if (seconds == 0)
-                {
-                    state = minutes.ToString() + Language.StringByID(StringId.minute);
-                }
-                else
-                {
-                    state = minutes.ToString() + Language.StringByID(StringId.minute) + seconds.ToString() + Language.StringByID(StringId.s);
-                }
-            }
-            else
-            {
-                if (seconds != 0)
-                {
-                    state = seconds.ToString() + Language.StringByID(StringId.s);
-                }
-            }
-            if (!string.IsNullOrEmpty(state))
-            {
-                state = Language.StringByID(StringId.delayLogic) + state;
-            }
-            return state;
+            return LogicMethod.Current.getTimeStr(strTimeValue).Replace("0s","");
+            //if (minutes != 0)
+            //{
+            //    if (seconds == 0)
+            //    {
+            //        state = minutes.ToString() + Language.StringByID(StringId.minute);
+            //    }
+            //    else
+            //    {
+            //        state = minutes.ToString() + Language.StringByID(StringId.minute) + seconds.ToString() + Language.StringByID(StringId.s);
+            //    }
+            //}
+            //else
+            //{
+            //    if (seconds != 0)
+            //    {
+            //        state = seconds.ToString() + Language.StringByID(StringId.s);
+            //    }
+            //}
+            //if (!string.IsNullOrEmpty(state))
+            //{
+            //    state = Language.StringByID(StringId.delayLogic) + state;
+            //}
+            //return state;
         }
         /// <summary>
         /// 鑾峰彇鏄剧ず闈㈢啛鏂囨湰

--
Gitblit v1.8.0