From 1635e5b2e6d853ef5d89f6ca3ef18edece91e7b1 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 23 十一月 2021 10:31:11 +0800
Subject: [PATCH] 1
---
HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs | 91 +++++++++++++++++----------------------------
1 files changed, 34 insertions(+), 57 deletions(-)
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
index 0ab9c3b..e6f0701 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -47,7 +47,34 @@
#region 缂栬緫璁惧鐘舵��
switch (device.spk)
{
- //寮�鍏崇伅鍏� light.Switch
+ //寮�鍏崇伅鍏�
+ case SPK.AirSwitch:
+ case SPK.LightSwitch:
+ //鎻掑骇
+ case SPK.PanelSocket:
+ case SPK.ElectricSocket:
+ {
+ #region 鐣岄潰
+ ///寮�鍏�
+ LogicView.FunTypeView lightSwitchView = new LogicView.FunTypeView();
+ lightSwitchView.btnText.TextID = StringId.switchLogic;
+ fLayout.AddChidren(lightSwitchView.FLayoutView());
+ #endregion
+ #region 鐐瑰嚮浜嬩欢
+ ///寮�鍏崇偣鍑讳簨浠�
+ lightSwitchView.btnClick.MouseUpEventHandler += (sender, e) =>
+ {
+ SwitchViewMethod(device, lightSwitchView.btnState, 2);
+ };
+ if (edit)
+ {
+ //鏄剧ず缂栬緫涔嬪墠鐨勮澶囩姸鎬�
+ GetEditState(device, index, lightSwitchView.btnState, null, null, null);
+ }
+ #endregion
+ }
+ break;
+ //鐏厜寮�鍏� 浜害
case SPK.LightDimming:
case SPK.LightRGB:
case SPK.LightRGBW:
@@ -84,28 +111,6 @@
#endregion
}
break;
- case SPK.LightSwitch:
- {
- #region 鐣岄潰
- ///寮�鍏�
- LogicView.FunTypeView lightSwitchView = new LogicView.FunTypeView();
- lightSwitchView.btnText.TextID = StringId.switchLogic;
- fLayout.AddChidren(lightSwitchView.FLayoutView());
- #endregion
- #region 鐐瑰嚮浜嬩欢
- ///寮�鍏崇偣鍑讳簨浠�
- lightSwitchView.btnClick.MouseUpEventHandler += (sender, e) =>
- {
- SwitchViewMethod(device, lightSwitchView.btnState, 2);
- };
- if (edit)
- {
- //鏄剧ず缂栬緫涔嬪墠鐨勮澶囩姸鎬�
- GetEditState(device, index, lightSwitchView.btnState, null, null, null);
- }
- #endregion
- }
- break;
//绐楀笜
case SPK.CurtainSwitch:
case SPK.CurtainTrietex:
@@ -132,6 +137,7 @@
}
break;
case SPK.AcStandard:
+ case SPK.HvacAC:
{
#region 鐣岄潰
///寮�鍏�
@@ -233,7 +239,7 @@
#endregion
}
break;
- case SPK.FloorHeatStandard:
+ case SPK.FloorHeatStandard:case SPK.HvacFloorHeat:
{
#region 鐣岄潰
///寮�鍏�
@@ -313,6 +319,7 @@
}
break;
case SPK.AirFreshStandard:
+ case SPK.HvacAirFresh:
{
#region 鐣岄潰
///寮�鍏�
@@ -436,8 +443,9 @@
}
break;
}
+ case SPK.HvacAC:
case SPK.AcStandard:
- case SPK.FloorHeatStandard:
+ case SPK.FloorHeatStandard:case SPK.HvacFloorHeat:
{
//鍋氫簡涓�涓壒娈婂鐞嗭紱
bool _bool = false;
@@ -461,38 +469,7 @@
}
}
break;
- case SPK.AirFreshStandard:
- {
- //鍋氫簡涓�涓壒娈婂鐞嗭紱
- bool _bool = false;
- for (int i = 0; i < dicSateteList.Count; i++)
- {
- var dic = dicSateteList[i];
- if (dic.ContainsValue("on_off"))
- {
- if (dic["on_off"] == "on")
- {
- //鍒ゆ柇鏄惁瀛樺湪涓旀槸寮�鐘舵��
- _bool = true;
- break;
- }
- }
- }
-
- if (!_bool)
- {
- //濡傛灉鏂伴鍚湁寮�鍏冲睘鎬т笖鏄叧=鐘舵�侊紱
- //娓呯┖鍒楄〃鎵�鏈夋暟鎹紝閲嶆柊鍗曠嫭閰嶇疆涓�涓紑鍏冲睘鎬т笖鏄叧=鐘舵�侊紱
- //(鏂伴灞炴�ф槸鍗曠嫭鎺у埗鐨�,濡傛灉閰嶇疆鍏筹紝鍐嶉厤缃竴涓閫燂紝椋庨�熶竴鏍锋墽琛�)
- dicSateteList.Clear();
- //娌℃湁寮�鍏冲氨榛樿娣诲姞-寮�-灞炴��
- Dictionary<string, string> diction = new Dictionary<string, string>();
- diction.Add("key", "on_off");
- diction.Add("value", "off");
- dicSateteList.Add(diction);
- }
- }
- break;
+
}
outputDevice.status = dicSateteList;
--
Gitblit v1.8.0