From 29160efe0f203c5e65dcf4e5a429ced6bde39187 Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期二, 29 八月 2023 15:35:24 +0800
Subject: [PATCH] 2023年08月29日15:35:09
---
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs | 59 +++++++++++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 49 insertions(+), 10 deletions(-)
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
index c0e98f6..dafeb0b 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicMethod.cs
@@ -131,7 +131,7 @@
/// <param name="dic">Dictionary绫�</param>
/// <param name="key">鍋�</param>
/// <param name="value">鍊�</param>
- public void dictionary(Dictionary<string, string> dic, string key, string value)
+ public void dictionary(Dictionary<string, string> dic, string key, string value)
{
if (dic.ContainsKey(key)) //鍒ゆ柇鏄惁瀛樺湪閿��
{
@@ -187,7 +187,10 @@
var list2 = this.GetVideoDeviceList();
list.AddRange(list1);
list.AddRange(list2);
- GetTestDevice(ref list, true);
+ list.AddRange(FunctionList.List.groupControls);
+#if DEBUG
+ //GetTestDevice(ref list, true);
+#endif
return list;
}
/// <summary>
@@ -203,7 +206,7 @@
function.spk = videoDevice.spk;
function.name = videoDevice.deviceName;
function.deviceId = videoDevice.deviceId;
- function.online = videoDevice.status == "online";
+ function.setOnine( videoDevice.status == "online");
function.sid = videoDevice.sid;
var video = functionList.Find((o) => o.deviceId == function.deviceId);
if (video == null)
@@ -356,7 +359,7 @@
{
return "MusicIcon/localMusic.png";
}
- else if (SPK.SensorPm10 == device.spk)
+ else if (SPK.SensorPm10 == device.spk || SPK.SensorPirHold == device.spk)
{
return "LogicIcon/sensor.png";
}
@@ -467,6 +470,8 @@
case SPK.SensorTVOC:
case SPK.SensorHcho:
case SPK.SensorHelp:
+ case SPK.SensorPirHold:
+
{
strPath = "LogicIcon/sensor.png";
}
@@ -495,7 +500,15 @@
{
List<string> deviceStrTypeList = new List<string>();
deviceStrTypeList.Clear();
-
+
+ //缇ゆ帶
+ var gp = deviceList.Find((device) =>
+ device.spk == SPK.GroupControl);
+ if (gp != null)
+ {
+ deviceStrTypeList.Add(Language.StringByID(StringId.GroupControl));
+ }
+
///鐏厜绫�
var lightjosn = deviceList.Find((device) =>
device.spk == SPK.LightSwitch
@@ -562,6 +575,7 @@
|| device.spk == SPK.SensorHcho
|| device.spk == SPK.SensorHelp
|| device.spk == SPK.SensorPm10
+ || device.spk == SPK.SensorPirHold
);
if (sensor != null)
{
@@ -572,6 +586,7 @@
device.spk == SPK.AirSwitch
|| device.spk == SPK.PanelSocket
|| device.spk == SPK.ElectricSocket
+ || device.spk == SPK.ElectricalTvHisense
);
if (electric != null)
{
@@ -605,7 +620,7 @@
}
///鎽勫儚澶寸被
var camera = deviceList.Find((device) =>
- device.spk == SPK.IpCam_Imou);
+ device.spk == SPK.IpCam_Imou || device.spk == SPK.Ev_Ipcam || device.spk == SPK.Peephole);
if (camera != null)
{
deviceStrTypeList.Add(Language.StringByID(StringId.shexiangtou));
@@ -633,6 +648,11 @@
functionTypeList.Add(SPK.AirSwitch);
functionTypeList.Add(SPK.PanelSocket);
functionTypeList.Add(SPK.ElectricSocket);
+ }
+ //缇ゆ帶
+ else if (deviceType == Language.StringByID(StringId.GroupControl))
+ {
+ functionTypeList.Add(SPK.GroupControl);
}
///绐楀笜绫�
else if (deviceType == Language.StringByID(StringId.Curtain))
@@ -686,6 +706,7 @@
functionTypeList.Add(SPK.SensorHcho);
functionTypeList.Add(SPK.SensorHelp);
functionTypeList.Add(SPK.SensorPm10);
+ functionTypeList.Add(SPK.SensorPirHold);
}
@@ -695,6 +716,7 @@
functionTypeList.Add(SPK.AirSwitch);
functionTypeList.Add(SPK.PanelSocket);
functionTypeList.Add(SPK.ElectricSocket);
+ functionTypeList.Add(SPK.ElectricalTvHisense);
}
///闂ㄩ攣绫�
else if (deviceType == Language.StringByID(StringId.DoorLock))
@@ -722,10 +744,15 @@
else if (deviceType == Language.StringByID(StringId.shexiangtou))
{
functionTypeList.Add(SPK.IpCam_Imou);
+ functionTypeList.Add(SPK.Ev_Ipcam);
+ functionTypeList.Add(SPK.Peephole);
}
else
{
//鍏ㄩ儴鍖哄煙
+ functionTypeList.Add(SPK.GroupControl);
+ functionTypeList.Add(SPK.Peephole);
+ functionTypeList.Add(SPK.Ev_Ipcam);
functionTypeList.Add(SPK.LightSwitch);
functionTypeList.Add(SPK.LightDimming);
functionTypeList.Add(SPK.LightRGB);
@@ -781,6 +808,8 @@
functionTypeList.Add(SPK.SensorPm10);
functionTypeList.Add(SPK.VideoDoorLock);
functionTypeList.Add(SPK.AcIr);
+ functionTypeList.Add(SPK.SensorPirHold);
+ functionTypeList.Add(SPK.ElectricalTvHisense);
}
@@ -799,6 +828,8 @@
{
case condition_if:
{
+ deviceTypeList.Add(SPK.Ev_Ipcam);
+ deviceTypeList.Add(SPK.Peephole);
deviceTypeList.Add(SPK.LightSwitch);
deviceTypeList.Add(SPK.LightRGB);
deviceTypeList.Add(SPK.LightRGBW);
@@ -842,11 +873,13 @@
deviceTypeList.Add(SPK.SensorPm10);
deviceTypeList.Add(SPK.VideoDoorLock);
deviceTypeList.Add(SPK.AcIr);
+ deviceTypeList.Add(SPK.SensorPirHold);
}
break;
case target_if:
{
+ deviceTypeList.Add(SPK.GroupControl);
deviceTypeList.Add(SPK.LightSwitch);
deviceTypeList.Add(SPK.LightRGB);
deviceTypeList.Add(SPK.LightRGBW);
@@ -866,6 +899,7 @@
deviceTypeList.Add(SPK.AvMusic);
deviceTypeList.Add(SPK.MechanicalArm);
deviceTypeList.Add(SPK.AcIr);
+ deviceTypeList.Add(SPK.ElectricalTvHisense);
}
break;
}
@@ -1184,14 +1218,19 @@
//new Entity.Function { sid = "1234567890", name = "瓒呭0娉紶鎰熷櫒", spk = Entity.SPK.SensorUtrasonic },
// new Entity.Function { sid = "1234567891", name = "娓╁害浼犳劅鍣�", spk = Entity.SPK.SensorTemperature },
// new Entity.Function { sid = "1234567892", name = "婀垮害浼犳劅鍣�", spk = Entity.SPK.SensorHumidity },
- new Entity.Function { sid = "12345678933456", name = "闂ㄩ攣", spk = Entity.SPK.DoorLock },
- new Entity.Function { sid = "1234567895444", name = "瑙嗛闂ㄩ攣", spk = Entity.SPK.VideoDoorLock },
- //new Entity.Function { sid = "12345678968888", name = "pm10", spk = Entity.SPK.SensorPm10 },
+ //new Entity.Function { sid = "12345678933456", name = "闂ㄩ攣", spk = Entity.SPK.DoorLock },
+ // new Entity.Function { sid = "1234567895444", name = "瑙嗛闂ㄩ攣", spk = Entity.SPK.VideoDoorLock },
+ //new Entity.Function { sid = "12345678968888", name = "浜轰綋瀛樺湪浼犳劅鍣�", spk = Entity.SPK.SensorPirHold },
+ new Entity.Function { sid = "12345678968888", name = "娴嬭瘯鐚溂", spk = Entity.SPK.Peephole },
+ new Entity.Function { sid = "12345678968889", name = "娴嬭瘯钀ょ煶鎽勫儚澶�", spk = Entity.SPK.Ev_Ipcam },
// new Entity.Function { sid = "1234567897", name = "姣背娉紶鎰熷櫒1", spk = Entity.SPK.SenesorMegahealth2 },
// new Entity.Function { sid = "1234567899", name = "闂ㄧ浼犳劅鍣�", spk = Entity.SPK.SensorDoorWindow },
// new Entity.Function { sid = "12345678991234", name = "HDL鏈烘鎵�", spk = Entity.SPK.MechanicalArm },
// new Entity.Function { sid = "123456789912345", name = "娴锋浖鏈烘鎵�", spk = Entity.SPK.MechanicalArm },
- // new Entity.Function { sid = "12345678991234566", name = "娴锋浖鏈烘鎵�", spk = Entity.SPK.MechanicalArm },
+ new Entity.Function { sid = "12345678991234566844", name = "澶у崕鎽勫儚澶�", spk = Entity.SPK.IpCam_Imou },
+ new Entity.Function { sid = "12345678991234567", name = "RGB", spk = Entity.SPK.LightRGB },
+ new Entity.Function { sid = "123456789912345678", name = "RGBW", spk = Entity.SPK.LightRGBW },
+ new Function { spk = SPK.ElectricalTvHisense, name = "娴蜂俊鐢佃1",sid="123456789"},
};
foreach (var function in functions)
{
--
Gitblit v1.8.0