From c29cd36f584338731704b1eaf3d34ea47908e0e5 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期二, 22 十二月 2020 13:38:39 +0800
Subject: [PATCH] 2020-12-22-3
---
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs | 30 ++++++++++--------------------
1 files changed, 10 insertions(+), 20 deletions(-)
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
index 2968b81..350280b 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -173,7 +173,7 @@
/// <param name="viewLayout">涓婁笅婊戝姩鎺т欢</param>
public static void OutputTarget(FrameLayout thisView, VerticalScrolViewLayout viewLayout)
{
-
+
for (int i = 0; i < Logic.currlogic.output.Count; i++)
{
Output outputTarget = Logic.currlogic.output[i];
@@ -230,33 +230,23 @@
{
string on_off = GetKeyValue("on_off", dicList);
string brightness = GetKeyValue("brightness", dicList);
- if (on_off != "")
+ if (on_off == "on" && brightness != "")
{
- if (on_off == "on")
- {
- stateStr = Language.StringByID(StringId.onLogic);
-
- }
- else
- {
- stateStr = Language.StringByID(StringId.offLogic);
-
- }
+ stateStr = Language.StringByID(StringId.onLogic) + brightness + "%";
}
- if (brightness != "")
+ else if (on_off == "on")
{
- stateStr += brightness + "%";
+ stateStr = Language.StringByID(StringId.onLogic);
}
- if (on_off != "" && on_off == "off")
+ else if (on_off == "off")
{
- targetView.btnState.Text = Language.StringByID(StringId.offLogic);
+ stateStr = Language.StringByID(StringId.offLogic);
}
- else
+ else if (brightness != "")
{
- targetView.btnState.Text = stateStr;
-
+ stateStr = brightness + "%";
}
-
+ targetView.btnState.Text = stateStr;
}
break;
case FunctionType.Curtain:
--
Gitblit v1.8.0