From 54c202bd4867092fca2bc6f96bec0cfd1056a46a Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期一, 06 十一月 2023 11:24:20 +0800
Subject: [PATCH] 2023年11月06日11:23:46
---
HDL-ON_iOS/Resources/Language.ini | 18 ++++++
HDL-ON_Android/Assets/Language.ini | 19 ++++++
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs | 13 ++++
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs | 49 +++++++++++++++-
HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs | 4 +
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/SwitchView.cs | 2
HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs | 8 ++
HDL_ON/Common/R.cs | 14 ++++
8 files changed, 120 insertions(+), 7 deletions(-)
diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini
index 94d0558..106d06c 100644
--- a/HDL-ON_Android/Assets/Language.ini
+++ b/HDL-ON_Android/Assets/Language.ini
@@ -1229,6 +1229,9 @@
7174=Exceed
7175=Under
7176=HV
+7177=Execution mode
+7178=Change execution
+7179=Execute on receipt
8501=Video door lock
8502=Electric quantity
@@ -2629,6 +2632,10 @@
7174=鐓ф槑搴﹂珮浜�
7175=鐓ф槑搴︿綆浜�
7176=鍏夌収
+7177=鎵ц妯″紡
+7178=鏀瑰彉鎵嶆墽琛�
+7179=鏀跺埌灏辨墽琛�
+
@@ -4017,6 +4024,9 @@
7174=Exceed
7175=Under
7176=HV
+7177=Execution mode
+7178=Change execution
+7179=Execute on receipt
8501=Video door lock
8502=Electric quantity
@@ -5398,6 +5408,9 @@
7174=Exceed
7175=Under
7176=HV
+7177=Execution mode
+7178=Change execution
+7179=Execute on receipt
8501=Video door lock
8502=Electric quantity
@@ -6785,6 +6798,9 @@
7174=Exceed
7175=Under
7176=HV
+7177=Execution mode
+7178=Change execution
+7179=Execute on receipt
8501=Video door lock
8502=Electric quantity
@@ -8110,6 +8126,9 @@
7174=Exceed
7175=Under
7176=HV
+7177=Execution mode
+7178=Change execution
+7179=Execute on receipt
8501=袙褨写械芯蟹邪屑芯泻 写胁械褉械泄
8502=袣褨谢褜泻褨褋褌褜 械谢械泻褌褉芯械薪械褉谐褨褩
diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini
index 94d0558..864ca1a 100644
--- a/HDL-ON_iOS/Resources/Language.ini
+++ b/HDL-ON_iOS/Resources/Language.ini
@@ -1229,6 +1229,9 @@
7174=Exceed
7175=Under
7176=HV
+7177=Execution mode
+7178=Change execution
+7179=Execute on receipt
8501=Video door lock
8502=Electric quantity
@@ -2629,6 +2632,9 @@
7174=鐓ф槑搴﹂珮浜�
7175=鐓ф槑搴︿綆浜�
7176=鍏夌収
+7177=鎵ц妯″紡
+7178=鏀瑰彉鎵嶆墽琛�
+7179=鏀跺埌灏辨墽琛�
@@ -4017,6 +4023,9 @@
7174=Exceed
7175=Under
7176=HV
+7177=Execution mode
+7178=Change execution
+7179=Execute on receipt
8501=Video door lock
8502=Electric quantity
@@ -5398,6 +5407,9 @@
7174=Exceed
7175=Under
7176=HV
+7177=Execution mode
+7178=Change execution
+7179=Execute on receipt
8501=Video door lock
8502=Electric quantity
@@ -6785,6 +6797,9 @@
7174=Exceed
7175=Under
7176=HV
+7177=Execution mode
+7178=Change execution
+7179=Execute on receipt
8501=Video door lock
8502=Electric quantity
@@ -8110,6 +8125,9 @@
7174=Exceed
7175=Under
7176=HV
+7177=Execution mode
+7178=Change execution
+7179=Execute on receipt
8501=袙褨写械芯蟹邪屑芯泻 写胁械褉械泄
8502=袣褨谢褜泻褨褋褌褜 械谢械泻褌褉芯械薪械褉谐褨褩
diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs
index 19b54db..49f3d59 100644
--- a/HDL_ON/Common/R.cs
+++ b/HDL_ON/Common/R.cs
@@ -3547,7 +3547,19 @@
/// 鍏夌収
/// </summary>
public const int guangzhao = 7176;
-
+ /// <summary>
+ /// 鎵ц妯″紡
+ /// </summary>
+ public const int zhixingmoshi = 7177;
+ /// <summary>
+ /// 鏀瑰彉鎵嶆墽琛�
+ /// </summary>
+ public const int gaibiancaizhixing = 7178;
+ /// <summary>
+ /// 鏀跺埌灏辨墽琛�
+ /// </summary>
+ public const int shoudaojiuzhixing = 7179;
+
/// <summary>
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
index d64166b..af8ae15 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -3,7 +3,6 @@
using System.Collections.Generic;
using HDL_ON.Entity;
using HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock;
-using Newtonsoft.Json;
namespace HDL_ON.UI.UI2.Intelligence.Automation
@@ -42,8 +41,12 @@
/// 浜轰綋浼犳劅鍣ㄦ寔缁椂闂翠笓鐢�
/// </summary>
private string hold_time=string.Empty;
+ /// <summary>
+ /// 妫�娴嬬被鍨� 閰嶅悎condition_type=3鏃朵娇鐢�,娌℃湁璇ュ瓧娈点�佽鍊兼垨0: 鐘舵�佹娴�(姣忔鏀跺埌鐘舵�佸氨鎴愮珛),1:鍔ㄤ綔妫�娴�(闇�瑕佸垏鎹㈢姸鎬佹墠鎴愮珛)
+ /// </summary>
+ private string detect_type = "0";
-
+
private static ConditionDeviceFunList m_Current = null;
@@ -199,7 +202,7 @@
//浜轰綋瀛樺湪浼犳劅鍣�
case SPK.SensorPirHold:
{
-
+
LogicView.FunTypeView view1 = new LogicView.FunTypeView();
view1.btnText.TextID = StringId.rentijiance;
@@ -227,6 +230,31 @@
};
+ LogicView.FunTypeView view3 = new LogicView.FunTypeView();
+ view3.frameLayout.Y = view2.frameLayout.Bottom;
+ view3.btnText.TextID = StringId.zhixingmoshi;
+ view3.btnState.TextID = StringId.shoudaojiuzhixing;
+ fLayout.AddChidren(view3.FLayoutView());
+ view3.btnClick.MouseUpEventHandler += (sender, e) =>
+ {
+ FrameLayout frame = new FrameLayout { BackgroundColor = CSS.CSS_Color.viewTrans60lucence };
+ this.AddChidren(frame);
+ LogicView.SwitchView switchView = new LogicView.SwitchView();
+ switchView.FLayoutView(frame, StringId.gaibiancaizhixing, StringId.shoudaojiuzhixing, view3.btnState.Text, 2, (intValue) =>
+ {
+ if (StringId.gaibiancaizhixing == intValue)
+ {
+ this.detect_type = "1";
+ }
+ else
+ {
+ this.detect_type = "0";
+ }
+ view3.btnState.TextID = intValue;
+ selectedState = device.spk + "_" + this.detect_type;
+ });
+ };
+
if (edit)
{
@@ -239,9 +267,21 @@
int h = time / (60 * 60);
int m = time % (60 * 60) / 60;
int s = (time % (60 * 60) % 60);
- view2.btnState.Text = LogicMethod.Current.getTimeStr(inputs.hold_time);
+ view2.btnState.Text = LogicMethod.Current.getTimeStr(inputs.hold_time);
view2.btnState.Name = h + ":" + m + ":" + s;
this.hold_time = inputs.hold_time;
+ }
+ if (!string.IsNullOrEmpty(inputs.detect_type))
+ {
+ this.detect_type = inputs.detect_type;
+ if (inputs.detect_type == "1")
+ {
+ view3.btnState.TextID = StringId.gaibiancaizhixing;
+ }
+ else
+ {
+ view3.btnState.TextID = StringId.shoudaojiuzhixing;
+ }
}
}
catch { }
@@ -843,6 +883,7 @@
{
//浜轰綋瀛樺湪浼犳劅鍣�
inputDevice.hold_time = this.hold_time;
+ inputDevice.detect_type = this.detect_type;
}
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
index 1425f70..c5fbf03 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 = LogicMethod.Current.getTimeStr(inputCondition.hold_time).Replace("0s","");
+ inputView.btnState.Text = LogicMethod.Current.getTimeStr(inputCondition.hold_time).Replace("0s", "");
break;
}
@@ -505,6 +505,17 @@
int time = int.Parse(inputCondition.hold_time);
inputView.btnState.Text += "鎸佺画" + LogicMethod.Current.getTimeStr(inputCondition.hold_time).Replace("0s", "");
}
+ if (!string.IsNullOrEmpty(inputCondition.detect_type))
+ {
+ if (inputCondition.detect_type == "1")
+ {
+ inputView.btnState.Text += "," + Language.StringByID(StringId.gaibiancaizhixing);
+ }
+ else
+ {
+ inputView.btnState.Text += "," + Language.StringByID(StringId.shoudaojiuzhixing);
+ }
+ }
}
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs
index da5fb58..807103c 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs
@@ -107,6 +107,10 @@
/// </summary>
public string identifier = "";
/// <summary>
+ /// 妫�娴嬬被鍨� 閰嶅悎condition_type=3鏃朵娇鐢�,娌℃湁璇ュ瓧娈点�佽鍊兼垨0: 鐘舵�佹娴�(姣忔鏀跺埌鐘舵�佸氨鎴愮珛),1:鍔ㄤ綔妫�娴�(闇�瑕佸垏鎹㈢姸鎬佹墠鎴愮珛);
+ /// </summary>
+ public string detect_type = "0";
+ /// <summary>
/// 浜轰綋绉诲姩浼犳劅鍣紙甯︽寔缁椂闂达級
/// </summary>
public string hold_time = "";
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/SwitchView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/SwitchView.cs
index 290a07f..138c39d 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/SwitchView.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/SwitchView.cs
@@ -197,7 +197,7 @@
};
///鏄剧ず涔嬪墠鐘舵��
- if (stateVuale != "")
+ if (!string.IsNullOrEmpty(stateVuale))
{
if (stateVuale == btnOn.Text)
{
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
index 069e547..1fe9733 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
@@ -118,6 +118,10 @@
{
inputTypeJOb.Add("hold_time", dictionary.hold_time);
}
+ if (!string.IsNullOrEmpty(dictionary.detect_type))
+ {
+ inputTypeJOb.Add("detect_type", dictionary.detect_type);
+ }
inputTypeJOb.Add("condition_type", dictionary.condition_type);
if (dictionary.condition_type=="9") {
inputTypeJOb.Add("identifier", dictionary.identifier);
@@ -249,6 +253,10 @@
{
inputTypeJOb.Add("hold_time", dictionary.hold_time);
}
+ if (!string.IsNullOrEmpty(dictionary.detect_type))
+ {
+ inputTypeJOb.Add("detect_type", dictionary.detect_type);
+ }
inputTypeJOb.Add("condition_type", dictionary.condition_type);
if (dictionary.condition_type == "9")
{
--
Gitblit v1.8.0