From b8b6286b336ffcb778d5e7ed0e7881ab6f41619f Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期二, 07 六月 2022 17:02:47 +0800 Subject: [PATCH] Merge branch 'release0123' into Dev-Branch --- HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs | 47 +++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 45 insertions(+), 2 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..2b606ad 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs @@ -86,6 +86,22 @@ } } break; + //绱ф�ュ懠鍙� + case SPK.SensorHelp: + { + LogicView.FunTypeView view = new LogicView.FunTypeView(); + view.btnText.TextID = StringId.qiujiuandzhengchang; + fLayout.AddChidren(view.FLayoutView()); + view.btnClick.MouseUpEventHandler += (sender, e) => + { + DeviceView(device, view.btnState, StringId.qiujiu, StringId.zhengchang); + }; + if (edit) + { + GetEditState(device, index, view.btnState, null, null, null); + } + } + break; //姘存蹈浼犳劅鍣� case SPK.SensorWater: { @@ -389,6 +405,23 @@ }; } 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; } #region 淇濆瓨 ///淇濆瓨View @@ -466,12 +499,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"; @@ -482,6 +516,7 @@ case SPK.SensorGas: case SPK.SensorWater: case SPK.SensorSmoke: + case SPK.SensorHelp: { keyVlaue = "status"; if (!Is_SpkAttribute(keyVlaue)) { @@ -521,6 +556,11 @@ { keyVlaue = "megahealth_state"; } + } + break; + case SPK.DoorLock: + { + keyVlaue = "door_status"; } break; @@ -566,6 +606,7 @@ } } break; + case StringId.shi: case StringId.kaiqi: { value = "open"; @@ -590,6 +631,8 @@ { value = "fall"; }; break; + + } //鏄剧ず鏂囨湰 button.TextID = intValue; -- Gitblit v1.8.0