From 3f6685c77beeb12baf840733fb890860f4c26e7c Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期四, 25 七月 2024 17:25:59 +0800 Subject: [PATCH] 2024年07月25日17:24:45 --- HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs | 35 ++++++++++++++++------------------- 1 files changed, 16 insertions(+), 19 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..f9b6c67 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,17 +82,22 @@ 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, Width = Application.GetRealWidth(50), - Height = Application.GetRealHeight(22), + Height = Application.GetRealHeight(100), TextColor = CSS.CSS_Color.textRedColor, Gravity = Gravity.Center, 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