From da1a17600b9ca8c8980ba64447688ee0a6718756 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期一, 13 六月 2022 11:56:21 +0800
Subject: [PATCH] Merge branch 'Dev-Branch' into wxr0114
---
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs | 44 ++++++++++++++++++++++++++++++++++++--------
1 files changed, 36 insertions(+), 8 deletions(-)
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
index 1c9b2bc..16e2186 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -61,7 +61,6 @@
//绌鸿皟
case SPK.AcStandard:
case SPK.HvacAC:
- case SPK.HvacCac://姣涚粏绌鸿皟
//鍦扮儹
case SPK.FloorHeatStandard:
case SPK.HvacFloorHeat:
@@ -361,6 +360,7 @@
//tvoc
case SPK.SensorTVOC:
{
+
///tvoc
LogicView.FunTypeView tvocView = new LogicView.FunTypeView();
tvocView.btnText.TextID = StringId.tvoc;
@@ -387,6 +387,23 @@
PmCo2TvocAction(this, device, "hcho", StringId.Formaldehyde, index, edit);
};
+ }
+ break;
+ //闂ㄩ攣
+ case SPK.DoorLock:
+ {
+
+ LogicView.FunTypeView view = new LogicView.FunTypeView();
+ view.btnText.TextID = StringId.shifoukaisuoshi;
+ fLayout.AddChidren(view.FLayoutView());
+ view.btnClick.MouseUpEventHandler += (sender, e) =>
+ {
+ DeviceView(device, view.btnState, StringId.shi, StringId.offLogic,1);
+ };
+ if (edit)
+ {
+ GetEditState(device, index, view.btnState, null, null, null);
+ }
}
break;
}
@@ -466,12 +483,13 @@
/// <param name="button">閫変腑鐘舵�佹樉绀烘枃鏈珺tn鎺т欢</param>
/// <param name="btnText1">灞炴�х姸鎬佸�兼枃鏈�1</param>
/// <param name="btnText2">灞炴�х姸鎬佸�兼枃鏈�2</param>
- private void DeviceView(Entity.Function device, Button button, int btnText1, int btnText2)
+ /// <param name="viewCount">view鏁伴噺</param>
+ private void DeviceView(Entity.Function device, Button button, int btnText1, int btnText2,int viewCount=2)
{
FrameLayout frame = new FrameLayout { BackgroundColor = CSS.CSS_Color.viewTrans60lucence };
this.AddChidren(frame);
LogicView.SwitchView switchView = new LogicView.SwitchView();
- switchView.FLayoutView(frame, btnText1, btnText2, button.Text, (intValue) =>
+ switchView.FLayoutView(frame, btnText1, btnText2, button.Text, viewCount,(intValue) =>
{
//璁惧灞炴�у�硷紝浜戦泙涓婂畾涔夊ソ鐨�;
string keyVlaue = "on_off";
@@ -523,6 +541,11 @@
}
}
break;
+ case SPK.DoorLock:
+ {
+ keyVlaue = "door_status";
+ }
+ break;
}
switch (intValue)
@@ -566,6 +589,7 @@
}
}
break;
+ case StringId.shi:
case StringId.kaiqi:
{
value = "open";
@@ -590,6 +614,8 @@
{
value = "fall";
}; break;
+
+
}
//鏄剧ず鏂囨湰
button.TextID = intValue;
@@ -666,7 +692,7 @@
/// <param name="stateValue">缂栬緫涔嬪墠鐨勭姸鎬佸��,榛樿涓�""</param>
public void PmCo2TvocAction(FrameLayout frame, Entity.Function device, string key, int title, int index, bool edit, string stateValue = "")
{
- if (edit)
+ if (edit)
{
///
this.function = device;
@@ -680,12 +706,14 @@
}
}
PublicInterface view = new PublicInterface();
- var listStr = view.GetViewList(key);
- view.SingleSelectionShow(frame, listStr, Language.StringByID(title), view.GetString(key, stateValue)
+ //var listStr = view.GetViewList(key);
+ var listStr = view.GetSensorLevelList(device);//2022骞�05鏈�25鏃�10:01:33 浜у搧缁忕悊鍚涚厡瑕佹眰鏀规垚鍔ㄦ��
+ view.SingleSelectionShow(frame, listStr, Language.StringByID(title), view.GetSensorLevelText(device, stateValue,true)
, (text) =>
{
- var value = view.GetValue(key, text);
+ //var value = view.GetValue(key, text);
+ var values = view.GetSensorLevelText(device,text,false);
selectedState = device.spk + "_" + key;
switch (device.spk)
{
@@ -703,7 +731,7 @@
}
break;
}
- AddDictionary(key, value, "integer", "in");
+ AddDictionary(key, values, "integer", "in");
Save(device, index, edit);
});
}
--
Gitblit v1.8.0