From a9d1161b1df96e7ddad566335989a1444e433ef5 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期二, 28 三月 2023 11:54:45 +0800 Subject: [PATCH] 2023年03月28日11:52:02 --- HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs | 33 +++++++++++++++------------------ 1 files changed, 15 insertions(+), 18 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs index 7113132..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; @@ -81,7 +82,11 @@ BackgroundColor = CSS.CSS_Color.view, Gravity = Gravity.BottomCenter,//缃簳鐨勫睘鎬� }; - this.AddChidren(frameLayout); + ///鍙互鏄剧ず鍒犻櫎鎺т欢 + if (Logic.currlogic.tag == false) + { + this.AddChidren(frameLayout); + } Button btnDel = new Button { TextSize = LogicView.TextSize.text16, @@ -92,6 +97,7 @@ TextID = StringId.Del, }; frameLayout.AddChidren(btnDel); + EventHandler<MouseEventArgs> delClick = (sender, e) => @@ -107,8 +113,7 @@ try { //鍙戦�佸垹闄ら�昏緫鍛戒护锛� - responsePackNew = Send.DelLogic(Logic.currlogic); - + responsePackNew = Send.Current.DelLogic(Logic.currlogic, true); } catch { } finally @@ -116,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