From 592974441a4df95fffd9167c90192da1a390b1c2 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期二, 06 六月 2023 11:51:12 +0800 Subject: [PATCH] Merge branch 'Dev-Branch' --- HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs | 47 ++++++++++++++++++++++++++++++++++------------- 1 files changed, 34 insertions(+), 13 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs index f38003b..84ea1a0 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs @@ -67,13 +67,12 @@ logicView.btnSwitchIcon.IsSelected = false; currLogic.enable = "false"; } - //Send.switchLogic(currLogic); new System.Threading.Thread(() => { try { //閫昏緫浣胯兘鐨勫懡浠� - Send.SwitchLogic(currLogic); + Send.Current.EnableLogic(currLogic); } catch { } @@ -81,6 +80,8 @@ }) { IsBackground = true }.Start(); }; + + GetSelectIcon(logicView.frameLayout, currLogic); if (i == 0)//闄嶅簭鎺掑垪 //if (Logic.LogicList.Count - 1 == i) @@ -95,6 +96,15 @@ else { logicView.btnSwitchIcon.IsSelected = false; + } + ///鏄剧ず鐗规畩鑷姩鍖栨爣蹇� + if (currLogic.tag == true) + { + logicView.btnIsDelTag.Visible = true; + } + else + { + logicView.btnIsDelTag.Visible = false; } } @@ -257,8 +267,8 @@ } List<string> logicIdList = new List<string>(); //鑾峰彇閫昏緫ID鍒楄〃 - var idStr = Send.GetLogicIdList(); - if (idStr.Code == "0" && idStr.Data != null && idStr.Data.ToString() != "") + var idStr = Send.Current.GetLogicIdList(); + if (idStr != null) { var date = Newtonsoft.Json.JsonConvert.SerializeObject(idStr.Data); var dateList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<LogicData>>(date); @@ -269,17 +279,13 @@ } } //鑾峰彇鑷姩鍖栧垪琛� - var logicStr = Send.GetLogic(logicIdList); - if (logicStr.Code == "0" && logicStr.Data != null && logicStr.Data.ToString() != "") + var logicListStr = Send.Current.GetLogic(logicIdList); + if (logicListStr != null) { - //鑾峰彇閫昏緫璇︾粏杩斿洖鏄竴涓暟缁�(object绫诲瀷杞崲涓烘暟缁�); - var jArray = JArray.Parse(logicStr.Data.ToString()); - for (int a = 0; a < jArray.Count; a++) + var logicList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Logic>>(logicListStr.Data.ToString()); + for (int j = 0; j < logicList.Count; j++) { - var jay = jArray[a]; - //鏁版嵁杩斿簭鍒楀寲涓篖ogic瀵硅薄 - var str = Newtonsoft.Json.JsonConvert.SerializeObject(jay); - var logic = Newtonsoft.Json.JsonConvert.DeserializeObject<Logic>(str); + var logic = logicList[j]; if (logic != null) { //鏌ユ壘鏄惁宸茬粡瀛樺湪璇ラ�昏緫 @@ -288,6 +294,7 @@ { Logic newlogic = new Logic(); + newlogic.tag = logic.tag; newlogic.name = logic.name; newlogic.userLogicId = logic.userLogicId; newlogic.sid = logic.sid; @@ -359,6 +366,7 @@ //2-鍔熻兘鍥炬爣 //3-浜戠鍥炬爣 //4-鍦烘櫙鍥炬爣 + //5-鍦扮悊鍥存爮 for (int i = 0; i < logic.input.Count; i++) { if (logic.input[i] == null) @@ -388,12 +396,19 @@ } break; + case 8: + { + iconInt = 5; + + } + break; case 10: { iconInt = 4; } break; + } if (!iconIntValue.Contains(iconInt)) @@ -504,6 +519,12 @@ strIcon = "LogicIcon/selectTheScene.png"; } break; + case 5: + { + + strIcon = "LogicIcon/selectlocation.png"; + } + break; case 11: { //鍒嗗壊鏉′欢鍜岀洰鏍囩殑鍥炬爣 -- Gitblit v1.8.0