From 452e8cef1c740d18ee398be6971d9952e41dbd4a Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 12 四月 2023 16:11:50 +0800
Subject: [PATCH] 1
---
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs | 95 +++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 86 insertions(+), 9 deletions(-)
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
index 2a295ff..58b303f 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -140,7 +140,7 @@
//鐢╯id鎵惧埌璁惧锛�
var device = LogicMethod.Current.GetDevice(inputCondition.sid);
//鐢ㄨ澶囩殑functionType绫诲瀷鎵惧埌瀵瑰簲鍥炬爣锛�
- inputView.btnIcon.UnSelectedImagePath = LogicMethod.Current.GetIconPath(device.spk);
+ inputView.btnIcon.UnSelectedImagePath = LogicMethod.Current.GetDeviceIconPath(device);
//鏄剧ず璁惧鍚嶇О
inputView.btnText.Text = device.name;
//鏀瑰彉璁惧鍚嶇О鏄剧ず鎺т欢瀹藉害
@@ -162,6 +162,7 @@
//绌鸿皟
case SPK.AcStandard:
case SPK.HvacAC:
+ case SPK.AcIr:
//鍦扮儹
case SPK.HvacFloorHeat:
case SPK.FloorHeatStandard:
@@ -311,7 +312,7 @@
}
}
break;
- case SPK.SensorEnvironment:
+ case SPK.SensorEnvironment:case SPK.SensorEnvironmentHailin:
case SPK.SensorEnvironment2:
case SPK.SensorEnvironment3:
{
@@ -386,6 +387,7 @@
}
break;
+ case SPK.SensorPm10:
case SPK.SensorCO2:
case SPK.SensorPm25:
case SPK.SensorTVOC:
@@ -405,6 +407,12 @@
}
}
break;
+ case SPK.VideoDoorLock:
+ {
+ string value = this.GetValue(dicList);
+ inputView.btnState.Text = value;
+ }
+ break;
case SPK.doorgate:
{
if (inputCondition.identifier == "door_call_cloud_event")
@@ -417,6 +425,15 @@
var FaceItem = this.GetFaceItem(userId, device.deviceId);
inputView.btnState.Text = FaceItem.userName;
}
+ }
+ break;
+ case SPK.IpCam_Imou:
+ {
+ if (inputCondition.identifier == "door_caipcam_region_alram_eventll_cloud_event")
+ {
+ inputView.btnState.Text = Language.StringByID(StringId.quyuruqingaojing);
+ }
+
}
break;
}
@@ -662,7 +679,7 @@
{
//鐢╯id鎵惧埌璁惧锛�
var device = LogicMethod.Current.GetDevice(inputCondition.sid);
- if (device.spk == SPK.SensorEnvironment
+ if (device.spk == SPK.SensorEnvironment || device.spk == SPK.SensorEnvironmentHailin
|| device.spk == SPK.SensorEnvironment2
|| device.spk == SPK.SensorEnvironment3
)
@@ -747,6 +764,12 @@
{
this.SensorView(thisView, device, "co2", indexVulae);
+
+ }
+ else if (device.spk == SPK.SensorPm10)
+ {
+
+ this.SensorView(thisView, device, "pm10", indexVulae);
}
else if (device.spk == SPK.SensorPm25)
@@ -914,7 +937,7 @@
//鐢╯id鎵惧埌璁惧锛�
var device = LogicMethod.Current.GetDevice(outputTarget.sid);
//鐢ㄨ澶囩殑functionType绫诲瀷鎵惧埌瀵瑰簲鍥炬爣锛�
- targetView.btnIcon.UnSelectedImagePath = LogicMethod.Current.GetIconPath(device.spk);
+ targetView.btnIcon.UnSelectedImagePath = LogicMethod.Current.GetDeviceIconPath(device);
//鏄剧ず璁惧鍚嶇О
targetView.btnText.Text = device.name;
//鏀瑰彉璁惧鍚嶇О鏄剧ず鎺т欢瀹藉害
@@ -923,11 +946,24 @@
//鍖哄埆涓嶅悓璁惧锛屾樉绀轰笉鍚岃澶囩姸鎬�
switch (device.spk)
{
-
+
+ //鎻掑骇(鏈塙SB)
+ case SPK.PanelSocket:
+ {
+ string on_off = GetKeyValue("on_off_master", dicList);
+ if (on_off == "on")
+ {
+ stateStr = Language.StringByID(StringId.onLogic);
+ }
+ else
+ {
+ stateStr = stateStr = Language.StringByID(StringId.offLogic);
+ }
+ }
+ break;
case SPK.AirSwitch:
case SPK.LightSwitch:
//鎻掑骇
- case SPK.PanelSocket:
case SPK.ElectricSocket:
//鏈烘鎵�
case SPK.MechanicalArm:
@@ -1052,6 +1088,7 @@
break;
case SPK.AcStandard:
case SPK.HvacAC:
+ case SPK.AcIr:
{
string on_off = GetKeyValue("on_off", dicList);
string set_temp = GetKeyValue("set_temp", dicList);
@@ -1441,8 +1478,23 @@
{
switch (device.spk)
{
- //鎻掑骇
+ //鎻掑骇(鏈塙SB)
case SPK.PanelSocket:
+ {
+ foreach (var dic in dicList)
+ {
+ string value = dic["value"];
+ if (value == "on")
+ {
+ button1.Text = Language.StringByID(StringId.onLogic);
+ }
+ else
+ {
+ button1.Text = Language.StringByID(StringId.offLogic);
+ }
+ }
+ }
+ break;
case SPK.ElectricSocket:
//寮�鍏崇伅鍏�
case SPK.AirSwitch:
@@ -1618,6 +1670,7 @@
break;
case SPK.AcStandard:
case SPK.HvacAC:
+ case SPK.AcIr:
{
foreach (var dic in dicList)
{
@@ -2084,6 +2137,15 @@
}
}
break;
+ case SPK.VideoDoorLock:
+ {
+ foreach (var dic in dicList)
+ {
+ string value = dic["value"];
+ button1.Text = value;
+ }
+ }
+ break;
case SPK.MusicStandard:
case SPK.AvMusic:
{
@@ -2106,6 +2168,7 @@
button2.Text = this.GetFaceItem(value, device.deviceId).userName;
}
break;
+
}
}
/// <summary>
@@ -2282,6 +2345,7 @@
break;
case SPK.AcStandard:
case SPK.HvacAC:
+ case SPK.AcIr:
case SPK.FloorHeatStandard:
case SPK.HvacFloorHeat:
{
@@ -2399,7 +2463,9 @@
/// <returns></returns>
private string GetTimeText(string strTimeValue)
{
- var timeValue = int.Parse(strTimeValue);
+ //鍥犱负璋冭瘯杞欢涓婁紶涓虹┖杩�;
+ string intTimeValue = string.IsNullOrEmpty(strTimeValue) ? "0" : strTimeValue;
+ var timeValue = int.Parse(intTimeValue);
string state = "";
var minutes = timeValue / 60;
var seconds = timeValue % 60;
@@ -2473,6 +2539,11 @@
strtext = Language.StringByID(StringId.co2) + new PublicInterface { }.GetString("co2", value);
}
break;
+ case "pm10":
+ {
+ strtext = Language.StringByID(StringId.pm10) + new PublicInterface { }.GetString("pm25", value);
+ }
+ break;
case "pm25":
{
strtext = Language.StringByID(StringId.pm25) + new PublicInterface { }.GetString("pm25", value);
@@ -2499,8 +2570,9 @@
Input inputedit = Logic.currlogic.input[indexVulae];
///鐘舵�佸��
string stateValue = "";
- foreach (var dic in inputedit.condition)
+ for (int i=0;i<inputedit.condition.Count;i++)
{
+ var dic = inputedit.condition[i];
string comparator = dic["comparator"];
stateValue = dic["value"];
switch (key)
@@ -2539,6 +2611,11 @@
ConditionDeviceFunList.Current.PmCo2TvocAction(thisView, device, "co2", StringId.co2, indexVulae, true, stateValue);
}
break;
+ case "pm10":
+ {
+ ConditionDeviceFunList.Current.PmCo2TvocAction(thisView, device, "pm10", StringId.pm10, indexVulae, true, stateValue);
+ }
+ break;
case "pm25":
{
ConditionDeviceFunList.Current.PmCo2TvocAction(thisView, device, "pm25", StringId.pm25, indexVulae, true, stateValue);
--
Gitblit v1.8.0