From f8f87a4fe67a1539b6fb85a54e4c178474792285 Mon Sep 17 00:00:00 2001 From: hxb <hxb@hdlchina.com.cn> Date: 星期二, 20 九月 2022 13:22:22 +0800 Subject: [PATCH] 完善后退功能 --- HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs | 50 ++++++++++++++++++++++++++++++-------------------- 1 files changed, 30 insertions(+), 20 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs index af47048..3c52457 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs @@ -71,7 +71,6 @@ //绌鸿皟 case SPK.AcStandard: case SPK.HvacAC: - case SPK.HvacCac://姣涚粏绌鸿皟 //鍦扮儹 case SPK.FloorHeatStandard: case SPK.HvacFloorHeat: @@ -89,22 +88,6 @@ view.btnClick.MouseUpEventHandler += (sender, e) => { DeviceView(device, view.btnState, StringId.onLogic, StringId.offLogic); - }; - if (edit) - { - GetEditState(device, index, view.btnState, null, null, null); - } - } - 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) { @@ -230,7 +213,25 @@ //姣背娉紶鎰熷櫒(鑷爺鍖楅偖) case SPK.SenesorMegahealth: { + int intValue =0; + if (edit) + { + Input inputs = Logic.currlogic.input[index]; + var dicList = inputs.condition; + foreach (var dic in dicList) + { + if (dic["key"] == "target_status") + { + intValue = 1; + } + else + { + intValue = 2; + } + break; + } + } LogicView.FunTypeView view1= new LogicView.FunTypeView(); view1.btnText.TextID = StringId.diedaobaojing; view1.btnState.Name = Language.StringByID(StringId.diedaobaojing); @@ -245,9 +246,19 @@ view2.btnText.TextID = StringId.yourenbaojing; view2.btnState.Name = Language.StringByID(StringId.yourenbaojing); fLayout.AddChidren(view2.FLayoutView()); + + if (intValue==1) { + view2.frameLayout.Visible = false; + + } + if (intValue == 2) + { + view2.frameLayout.Y = Application.GetRealHeight(0); + } + view2.btnClick.MouseUpEventHandler += (sender, e) => { - DeviceView(device, view2.btnState, StringId.shi, StringId.offLogic, 1); + DeviceView(device, view2.btnState, StringId.youren, StringId.wuren, 2); }; if (edit) { @@ -555,7 +566,6 @@ case SPK.SensorGas: case SPK.SensorWater: case SPK.SensorSmoke: - case SPK.SensorHelp: { keyVlaue = "status"; if (!Is_SpkAttribute(keyVlaue)) { @@ -652,7 +662,7 @@ break; case StringId.wuren: { - if (device.spk == SPK.SenesorMegahealth || device.spk == SPK.SenesorMegahealth2) + if (device.spk == SPK.SenesorMegahealth2) { value = "uninhabited"; } -- Gitblit v1.8.0