From f77a3add1e7ab266e473da9128bbe5758ba3a890 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期日, 20 十二月 2020 19:29:03 +0800 Subject: [PATCH] Merge branch 'NewFilePath' into CJL --- HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs | 40 +++++++++++++++++++++++++++++++--------- 1 files changed, 31 insertions(+), 9 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs old mode 100644 new mode 100755 index 7e510d5..7eee6bc --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs @@ -21,7 +21,7 @@ ///璁板綍鏉′欢绫诲瀷 inputView.btnClick.Name = inputCondition.condition_type; ///璁板綍鏉′欢绱㈠紩 - inputView.btnClick.Tag = i; + inputView.btnClick.Tag = inputCondition.sid; ///鏉′欢鐘舵�佹暟缁� List<Dictionary<string, string>> dicList = inputCondition.condition as List<Dictionary<string, string>>; //鏄剧ず鏉′欢鍚勭绫诲瀷鐘舵�� @@ -29,7 +29,7 @@ { case "1": { - inputView.btnIcon.UnSelectedImagePath = "LogicIcon/timecondition.png"; + inputView.btnIcon.UnSelectedImagePath = "LogicIcon/time.png"; foreach (var dic in dicList) { string value = dic["value"]; @@ -40,7 +40,7 @@ break; case "2": { - inputView.btnIcon.UnSelectedImagePath = "LogicIcon/timecondition.png"; + inputView.btnIcon.UnSelectedImagePath = "LogicIcon/time.png"; foreach (var dic in dicList) { string value = dic["value"]; @@ -104,7 +104,19 @@ { Button button = (Button)sen; //鎵惧埌褰撳墠缂栬緫鐨勭储寮� - int indexVulae = int.Parse(inputView.btnClick.Tag.ToString()); + int indexVulae = 0; + for (int index = 0; index < Logic.currlogic.input.Count; index++) + { + Input input = Logic.currlogic.input[index]; + if (input.sid == inputView.btnClick.Tag.ToString()) + { + //鐢ㄦ埛鍙兘鍒犻櫎鏁版嵁锛屼娇鍒楄〃绱㈠紩鍙戠敓鏀瑰彉锛� + //閫氳繃鍞竴sid閲嶆柊鏌ユ壘鍒扮储寮曚笖鏇存柊绱㈠紩鍊� + indexVulae = index; + break; + } + } + //鏍囪缂栬緫鐘舵�� bool edit = true; switch (button.Name) @@ -131,7 +143,6 @@ timeTpye.TimeHorizon(fLayout, edit, indexVulae); } break; - case "3": { //鐢╯id鎵惧埌璁惧锛� @@ -172,10 +183,10 @@ ///璁板綍鏉′欢绫诲瀷 targetView.btnClick.Name = outputTarget.target_type; ///璁板綍鏉′欢绱㈠紩 - targetView.btnClick.Tag = i; + targetView.btnClick.Tag = outputTarget.sid; ///鏉′欢鐘舵�佹暟缁� List<Dictionary<string, string>> dicList = outputTarget.status as List<Dictionary<string, string>>; - //鏄剧ず鏉′欢鍚勭绫诲瀷鐘舵�� + //鏄剧ず杈撳嚭鏉′欢鍚勭绫诲瀷鐘舵�� switch (outputTarget.target_type) { case "1": @@ -309,7 +320,7 @@ } - if (on_off != "" && on_off == "stop") + if (on_off != "" && on_off == "stop"|| on_off != "" && on_off == "off") { targetView.btnState.Text = Language.StringByID(StringId.stop); } @@ -543,7 +554,18 @@ { Button button = (Button)sen; //鎵惧埌褰撳墠缂栬緫鐨勭储寮� - int indexVulae = int.Parse(targetView.btnClick.Tag.ToString()); + int indexVulae =0; + for (int index = 0; index < Logic.currlogic.output.Count; index++) + { + Output target = Logic.currlogic.output[index]; + if (target.sid == targetView.btnClick.Tag.ToString()) + { + //鐢ㄦ埛鍙兘鍒犻櫎鏁版嵁锛屼娇鍒楄〃绱㈠紩鍙戠敓鏀瑰彉锛� + //閫氳繃鍞竴sid閲嶆柊鏌ユ壘鍒扮储寮曚笖鏇存柊绱㈠紩鍊� + indexVulae = index; + break; + } + } //鏍囪缂栬緫鐘舵�� bool edit = true; switch (button.Name) -- Gitblit v1.8.0