From 32ad85a377b00bc54ad7f15a45d7631d3e2b10d5 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期一, 13 六月 2022 17:41:12 +0800
Subject: [PATCH] 2022年06月13日17:39:46
---
HDL-ON_iOS/Resources/Language.ini | 4 +
HDL-ON_Android/Assets/Language.ini | 5 +
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs | 55 ++++++++++++++++++
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs | 87 ++++++++++++++++++++++++++++
HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs | 1
HDL_ON/Common/R.cs | 8 ++
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs | 6 +
7 files changed, 163 insertions(+), 3 deletions(-)
diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini
index 2e71213..c11cb59 100644
--- a/HDL-ON_Android/Assets/Language.ini
+++ b/HDL-ON_Android/Assets/Language.ini
@@ -1048,6 +1048,9 @@
7156=Distress
7157=whether to unlock
7158=is
+7159=Fall in the alarm
+7160=Someone called the police
+
@@ -2191,6 +2194,8 @@
7156=姹傛晳
7157=鏄惁寮�閿佹椂
7158=鏄�
+7159=璺屽�掓姤璀�
+7160=鏈変汉鎶ヨ
diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini
index aa18fb0..fc701ae 100644
--- a/HDL-ON_iOS/Resources/Language.ini
+++ b/HDL-ON_iOS/Resources/Language.ini
@@ -1047,6 +1047,8 @@
7156=Distress
7157=whether to unlock
7158=is
+7159=Fall in the alarm
+7160=Someone called the police
@@ -2189,6 +2191,8 @@
7156=姹傛晳
7157=鏄惁寮�閿佹椂
7158=鏄�
+7159=璺屽�掓姤璀�
+7160=鏈変汉鎶ヨ
diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs
index 7e86ec4..a58eae0 100644
--- a/HDL_ON/Common/R.cs
+++ b/HDL_ON/Common/R.cs
@@ -2775,6 +2775,14 @@
/// 鏄�
/// </summary>
public const int shi = 7158;
+ /// <summary>
+ /// 璺屽�掓姤璀�
+ /// </summary>
+ public const int diedaobaojing = 7159;
+ /// <summary>
+ /// 鏈変汉鎶ヨ
+ /// </summary>
+ public const int yourenbaojing = 7160;
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
index 7f0cc74..af47048 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -24,10 +24,20 @@
/// 瀹氫箟涓�涓彉閲忥紝璁板綍閫変腑鐘舵��
/// </summary>
private string selectedState = "unknown";
+ /// <summary>
+ /// 鏄笉鏄啀娆$紪杈�
+ /// </summary>
+ private bool mEdit;
+ /// <summary>
+ /// 杈撳叆鏉′欢鍒楄〃绱㈠紩鍊�
+ /// </summary>
+ private int mIndex;
public void Show(Entity.Function device, int index, bool edit)
{
this.function = device;
+ this.mEdit = edit;
+ this.mIndex = index;
#region 鐣岄潰甯冨眬
this.BackgroundColor = CSS.CSS_Color.viewMiddle;
LogicView.TopView topView = new LogicView.TopView();
@@ -217,8 +227,36 @@
}
}
break;
- //姣背娉紶鎰熷櫒
+ //姣背娉紶鎰熷櫒(鑷爺鍖楅偖)
case SPK.SenesorMegahealth:
+ {
+
+ LogicView.FunTypeView view1= new LogicView.FunTypeView();
+ view1.btnText.TextID = StringId.diedaobaojing;
+ view1.btnState.Name = Language.StringByID(StringId.diedaobaojing);
+ fLayout.AddChidren(view1.FLayoutView());
+ view1.btnClick.MouseUpEventHandler += (sender, e) =>
+ {
+ DeviceView(device, view1.btnState, StringId.shi, StringId.offLogic, 1);
+ };
+
+ LogicView.FunTypeView view2 = new LogicView.FunTypeView();
+ view2.frameLayout.Y = view1.frameLayout.Bottom;
+ view2.btnText.TextID = StringId.yourenbaojing;
+ view2.btnState.Name = Language.StringByID(StringId.yourenbaojing);
+ fLayout.AddChidren(view2.FLayoutView());
+ view2.btnClick.MouseUpEventHandler += (sender, e) =>
+ {
+ DeviceView(device, view2.btnState, StringId.shi, StringId.offLogic, 1);
+ };
+ if (edit)
+ {
+ GetEditState(device, index, view1.btnState, view2.btnState, null, null);
+ }
+
+ }
+ break;
+ //姣背娉紶鎰熷櫒(鍏嗚涓撶敤浜戜簯瀵规帴)
case SPK.SenesorMegahealth2:
{
LogicView.FunTypeView view = new LogicView.FunTypeView();
@@ -550,6 +588,23 @@
}
break;
case SPK.SenesorMegahealth:
+ {
+ if (button != null)
+ {
+
+ if (button.Name == Language.StringByID(StringId.yourenbaojing))
+ {
+ keyVlaue = "people_status";
+
+ }
+ else
+ {
+ keyVlaue = "target_status";
+ }
+ }
+
+ }
+ break;
case SPK.SenesorMegahealth2:
{
keyVlaue = "action_state";
@@ -608,6 +663,25 @@
}
break;
case StringId.shi:
+ {
+ value = "open";
+ if (button != null)
+ {
+
+ if (button.Name == Language.StringByID(StringId.yourenbaojing))
+ {
+ //鐘舵��(鏈変汉)
+ value = "true";
+
+ }
+ else if(button.Name == Language.StringByID(StringId.diedaobaojing))
+ {
+ //璺屽��
+ value = "4";
+ }
+ }
+ }
+ break;
case StringId.kaiqi:
{
value = "open";
@@ -639,6 +713,17 @@
button.TextID = intValue;
selectedState = device.spk + "_" + value;
AddDictionary(keyVlaue, value, "string");
+ if (button != null)
+ {
+
+ if (button.Name == Language.StringByID(StringId.yourenbaojing)
+ || (button.Name == Language.StringByID(StringId.diedaobaojing)))
+ {
+ //鍙湁姣背娉紶鎰熷櫒(鑷爺)
+ Save(device, mIndex, mEdit);
+ }
+ }
+
});
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
index eef7829..3afc54f 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -328,6 +328,33 @@
}
break;
case SPK.SenesorMegahealth:
+ {
+ foreach (var dic in dicList)
+ {
+ string value = dic["value"];
+ switch (dic["key"])
+ {
+ case "people_status":
+ {
+ if (value == "true")
+ {
+ inputView.btnState.Text = Language.StringByID(StringId.shi);
+ }
+
+ }
+ break;
+ case "target_status":
+ {
+ if (value == "4")
+ {
+ inputView.btnState.Text = Language.StringByID(StringId.shi);
+ }
+ }
+ break;
+ }
+
+ }
+ }break;
case SPK.SenesorMegahealth2:
{
foreach (var dic in dicList)
@@ -1968,6 +1995,34 @@
}
break;
case SPK.SenesorMegahealth:
+ {
+ foreach (var dic in dicList)
+ {
+ string value = dic["value"];
+ switch (dic["key"])
+ {
+ case "people_status":
+ {
+ if (value == "true")
+ {
+ button1.Text = Language.StringByID(StringId.shi);
+ }
+
+ }
+ break;
+ case "target_status":
+ {
+ if (value == "4")
+ {
+ button2.Text = Language.StringByID(StringId.shi);
+ }
+ }
+ break;
+ }
+
+ }
+ }
+ break;
case SPK.SenesorMegahealth2:
{
foreach (var dic in dicList)
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
index f429ada..d955285 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
@@ -78,6 +78,7 @@
ResponsePackNew responsePackNew = null;
try
{
+
var cycleJObject = new JObject { };
var cyclevaluejArray = new JArray { };
cycleJObject.Add("type", logic.cycle.type);
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs
index 4575ac6..7084db6 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs
@@ -291,9 +291,11 @@
/// <returns></returns>
public static ResponsePackNew RequestServerhomeId(object o, string api_Url, int mTimeout = 20)
{
- MainPage.Log("璇锋眰鏁版嵁=="+o.ToString());
+ MainPage.Log("绾㈠瀹濊姹傛暟鎹�:"+api_Url+"\r\n"+o.ToString());
var requestJson = HttpUtil.GetSignRequestJson(o);
- return HttpUtil.RequestHttpsPostFroHome(api_Url, requestJson, mTimeout);
+ var responsePackNew= HttpUtil.RequestHttpsPostFroHome(api_Url, requestJson, mTimeout);
+ MainPage.Log("鍥炲绾㈠瀹濊姹傛暟鎹�:" + "\r\n"+ Newtonsoft.Json.JsonConvert.SerializeObject(responsePackNew));
+ return responsePackNew;
}
/// <summary>
--
Gitblit v1.8.0