From 64dbbfe1d6488635e160189a704afccffc7d34d0 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期一, 07 十二月 2020 11:33:06 +0800 Subject: [PATCH] Merge branch 'WJC' --- HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs index 1db4522..5474311 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs @@ -72,7 +72,7 @@ }; if (edit) { - GetEditState(device, edit, index, lightSwitchView.btnState, null, null, null); + GetEditState(device, index, lightSwitchView.btnState, null, null, null); } } @@ -144,16 +144,22 @@ /// 鏄剧ず缂栬緫涔嬪墠鐨勮澶囩姸鎬� /// </summary> /// <param name="device">缂栬緫璁惧</param> - /// <param name="edit">缂栬緫鐘舵��</param> /// <param name="index">缂栬緫鏁版嵁鐨勭储寮�</param> /// <param name="button1">鏄剧ずBtn</param> /// <param name="button2">鏄剧ずBtn</param> /// <param name="button3">鏄剧ずBtn</param> /// <param name="button4">鏄剧ずBtn</param> - private void GetEditState(Entity.Function device, bool edit, int index, Button button1, Button button2, Button button3, Button button4) + private void GetEditState(Entity.Function device , int index, Button button1, Button button2, Button button3, Button button4) { Input inputs = Logic.currlogic.input[index]; var dicList = inputs.condition as List<Dictionary<string, string>>; + //娓呴櫎涔嬪墠鏃ф暟鎹� + dicSateteList.Clear(); + if (dicList.Count != 0) + { + //鏈夋暟鎹噸鏂拌祴鍊� + dicSateteList = dicList; + } switch (device.functionType) { //寮�鍏崇伅鍏� light.Switch @@ -270,18 +276,18 @@ switchView.btnOn.MouseUpEventHandler += (sender2, e2) => { LogicMethod.dictionary(dic, "value", "on"); - RemView(frame); button.TextID = StringId.onLogic; selectedState = device.functionType + "_on"; AddDictionaryData(dicSateteList, keyVlaue, dic); + RemView(frame); }; switchView.btnOff.MouseUpEventHandler += (sender3, e3) => { LogicMethod.dictionary(dic, "value", "off"); - RemView(frame); button.TextID = StringId.offLogic; selectedState = device.functionType + "_off"; AddDictionaryData(dicSateteList, keyVlaue, dic); + RemView(frame); }; if (button.Text != "") { -- Gitblit v1.8.0