From d5088d3bb198c0f53d4716022f010a02ac393977 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期四, 25 八月 2022 15:06:01 +0800 Subject: [PATCH] 2022年08月25日15:04:41 --- HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs | 26 +++++++++----------------- 1 files changed, 9 insertions(+), 17 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs index 06795e1..bffd42c 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs @@ -49,7 +49,7 @@ X = Application.GetRealWidth(40), Gravity = Gravity.CenterVertical, TextAlignment = TextAlignment.CenterRight, - Text =Logic.currlogic.name, + Text = Logic.currlogic.name, }; nameView.frameLayout.AddChidren(btnAutomationName); @@ -57,17 +57,18 @@ EventHandler<MouseEventArgs> editClick = (sender, e) => { List<string> list = new List<string>(); - foreach (var logic in Logic.LogicList) { + foreach (var logic in Logic.LogicList) + { list.Add(logic.name); } - new LogicView.TipPopView().InputBox(StringId.editName, Logic.currlogic.name, StringId.nameNull, StringId.NameAlreadyExists, list, (logicName,view + new LogicView.TipPopView().InputBox(StringId.editName, Logic.currlogic.name, StringId.nameNull, StringId.NameAlreadyExists, list, (logicName, view ) => { btnAutomationName.Text = logicName; Logic.currlogic.name = logicName; - },()=> { }); + }, () => { }); }; nameView.btnClick.MouseUpEventHandler += editClick; btnAutomationName.MouseUpEventHandler += editClick; @@ -112,8 +113,7 @@ try { //鍙戦�佸垹闄ら�昏緫鍛戒护锛� - responsePackNew = Send.DelLogic(Logic.currlogic); - + responsePackNew = Send.Current.DelLogic(Logic.currlogic, true); } catch { } finally @@ -121,27 +121,19 @@ Application.RunOnMainThread(() => { loading.Hide(); - if (responsePackNew != null && responsePackNew.Code == "0") + if (responsePackNew != null) { - LogicMethod.CurrLogicMethod.RemoveAllView(); + LogicMethod.Current.RemoveAllView(); Logic.LogicList.Remove(Logic.currlogic); MainView.MainShow(); //鍙戦�佸垹闄ら�昏緫鍛戒护锛� - } - else if (responsePackNew != null && responsePackNew.Code == "14005") - { - new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.gatewayNotOnline)); - } - else - { - new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.delFail)); } }); } }) { IsBackground = true }.Start(); - + }); }; -- Gitblit v1.8.0