From f5b46f80546aac860ade6e4c53821e43df833b39 Mon Sep 17 00:00:00 2001 From: tzy <hxb@hdlchina.com.cn> Date: 星期三, 09 六月 2021 11:11:28 +0800 Subject: [PATCH] Revert "Merge remote-tracking branch 'origin/wxr4' into dev-tzy" --- HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs | 72 +++++++++++++++++++----------------- 1 files changed, 38 insertions(+), 34 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs index ae546df..a1d1ecd 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs @@ -279,6 +279,7 @@ var jay = jArray[a]; //鏁版嵁杩斿簭鍒楀寲涓篖ogic瀵硅薄 var str = Newtonsoft.Json.JsonConvert.SerializeObject(jay); + Console.WriteLine("鑾峰彇閫昏緫==="+str); var logic = Newtonsoft.Json.JsonConvert.DeserializeObject<Logic>(str); if (logic != null) { @@ -287,39 +288,38 @@ if (if_logic == null) { - Logic newlogic = new Logic(); - newlogic.name = logic.name; - newlogic.userLogicId = logic.userLogicId; - newlogic.sid = logic.sid; - newlogic.relation = logic.relation; - newlogic.enable = logic.enable; - newlogic.cycle = logic.cycle; - for (int i = 0; i < logic.input.Count; i++) - { - if (logic.input[i] == null || string.IsNullOrEmpty(logic.input[i].condition_type)) - { - //闃叉璋冭瘯杞欢涔变紶涓滆タ涓婃潵; - //闃叉鏈夌┖瀵硅薄锛� - //姝e父鎯呭喌涓嬩笉浼氬嚭鐜扮殑鐜拌薄锛� - continue; - } - newlogic.input.Add(logic.input[i]); - } - for (int i = 0; i < logic.output.Count; i++) - { - if (logic.output[i] == null || string.IsNullOrEmpty(logic.output[i].target_type)) - { - //闃叉璋冭瘯杞欢涔变紶涓滆タ涓婃潵; - //闃叉鏈夌┖瀵硅薄锛� - //姝e父鎯呭喌涓嬩笉浼氳鐜拌薄锛� - continue; - } - newlogic.output.Add(logic.output[i]); - } - newlogic.noticeConfig = logic.noticeConfig; - newlogic.pushConfigs = logic.pushConfigs; + //Logic newlogic = new Logic(); + //newlogic.name = logic.name; + //newlogic.userLogicId = logic.userLogicId; + //newlogic.sid = logic.sid; + //newlogic.relation = logic.relation; + //newlogic.enable = logic.enable; + //newlogic.cycle = logic.cycle; + //for (int i = 0; i < logic.input.Count; i++) + //{ + // if (logic.input[i] == null || string.IsNullOrEmpty(logic.input[i].condition_type)) + // { + // //闃叉璋冭瘯杞欢涔变紶涓滆タ涓婃潵; + // //闃叉鏈夌┖瀵硅薄锛� + // //姝e父鎯呭喌涓嬩笉浼氬嚭鐜扮殑鐜拌薄锛� + // continue; + // } + // newlogic.input.Add(logic.input[i]); + //} + //for (int i = 0; i < logic.output.Count; i++) + //{ + // if (logic.output[i] == null || string.IsNullOrEmpty(logic.output[i].target_type)) + // { + // //闃叉璋冭瘯杞欢涔变紶涓滆タ涓婃潵; + // //闃叉鏈夌┖瀵硅薄锛� + // //姝e父鎯呭喌涓嬩笉浼氳鐜拌薄锛� + // continue; + // } + // newlogic.output.Add(logic.output[i]); + //} + //娣诲姞閫昏緫 - Logic.LogicList.Add(newlogic); + Logic.LogicList.Add(logic); } } @@ -511,7 +511,7 @@ } } /// <summary> - /// 鍒ゆ柇缃戝叧绫诲瀷(0:bus缃戝叧锛�1:A鍗忚缃戝叧) + /// 鍒ゆ柇缃戝叧绫诲瀷 /// </summary> /// <returns></returns> public static bool IsGatewayType @@ -522,7 +522,11 @@ { return true; } - return false; + else + { + return false; + + } } } } -- Gitblit v1.8.0