From adc150efb13a0506f45a3c344c3ee2ef2dba8e90 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期四, 01 七月 2021 15:19:13 +0800 Subject: [PATCH] 合并嘉乐lc代码 --- HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs | 40 ++++++++++++++++++++++++++++------------ 1 files changed, 28 insertions(+), 12 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs index 7b8bdcd..cc6dc7d 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs @@ -124,7 +124,11 @@ /// <summary> /// 鎸�+璺宠浆鍒伴�昏緫鐣岄潰鐨勬柟娉� /// </summary> +<<<<<<< HEAD public void SkipAddLogicPage(Logic logic=null) +======= + public static void SkipAddLogicPage() +>>>>>>> origin/CJL-LC { if (logic == null) { @@ -142,6 +146,7 @@ } else { + var onePortAutomation = new OnePortAutomation(); MainPage.BasePageView.AddChidren(onePortAutomation); onePortAutomation.Show(); @@ -260,7 +265,7 @@ if (idStr.Code == "0" && idStr.Data != null && idStr.Data.ToString() != "") { var date = Newtonsoft.Json.JsonConvert.SerializeObject(idStr.Data); - var dateList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<LogicData>>(date); + var dateList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Date>>(date); for (int i = 0; i < dateList.Count; i++) { //娣诲姞閫昏緫ID @@ -278,7 +283,6 @@ 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) { @@ -316,6 +320,8 @@ } newlogic.output.Add(logic.output[i]); } + newlogic.noticeConfig = logic.noticeConfig; + newlogic.pushConfigs = logic.pushConfigs; //娣诲姞閫昏緫 Logic.LogicList.Add(newlogic); } @@ -357,7 +363,8 @@ //2-鍔熻兘鍥炬爣 for (int i = 0; i < logic.input.Count; i++) { - + if (logic.input[i] == null) + continue; var int1 = int.Parse(logic.input[i].condition_type); int iconInt = 0; switch (int1) @@ -372,6 +379,14 @@ case 3: { iconInt = 2; + + } + break; + case 4: + case 6: + case 9: + { + iconInt = 3; } break; @@ -466,6 +481,12 @@ strIcon = "LogicIcon/selectTheFun.png"; } break; + case 3: + { + + strIcon = "LogicIcon/shiwaitianqi.png"; + } + break; case 11: { //鍒嗗壊鏉′欢鍜岀洰鏍囩殑鍥炬爣 @@ -494,7 +515,7 @@ } } /// <summary> - /// 鍒ゆ柇缃戝叧绫诲瀷 + /// 鍒ゆ柇缃戝叧绫诲瀷(0:bus缃戝叧锛�1:A鍗忚缃戝叧) /// </summary> /// <returns></returns> public static bool IsGatewayType @@ -504,22 +525,17 @@ if (Entity.DB_ResidenceData.Instance.GatewayType == 1) { return true; - } - else - { - return false; - - } + return false; } } } - class LogicData + class Date { /// <summary> /// 浜戠鍞竴id /// </summary> - public string userLogicId = ""; + public string userLogicId = ""; /// <summary> /// 缃戝叧id /// </summary> -- Gitblit v1.8.0