From 5eeafe3af80bfd88306bd8ad9e76c8f4b51ca35f Mon Sep 17 00:00:00 2001 From: hxb <hxb@hdlchina.com.cn> Date: 星期四, 17 十二月 2020 14:16:20 +0800 Subject: [PATCH] 增加本地发送的重发机制 --- HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs | 44 +++++++++++++++++++++++++++++++++++++------- 1 files changed, 37 insertions(+), 7 deletions(-) diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs index 94c4318..213d4ad 100644 --- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs +++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs @@ -35,8 +35,8 @@ nameView.btnText.Height = Application.GetRealHeight(22); nameView.btnText.TextID = StringId.namelogic; nameView.btnIcon.Visible = false; - nameView.btnNextIcon.Height = Application.GetMinRealAverage(28); - nameView.btnNextIcon.Width = Application.GetMinRealAverage(28); + nameView.btnNextIcon.Height = Application.GetRealWidth(28); + nameView.btnNextIcon.Width = Application.GetRealWidth(28); nameView.btnNextIcon.UnSelectedImagePath = "LogicIcon/editname.png"; viewLayout.AddChidren(nameView.FLayoutView()); @@ -95,13 +95,43 @@ EventHandler<MouseEventArgs> delClick = (sender, e) => { - + Loading loading = new Loading(); + this.AddChidren(loading); + HDL_ON.DAL.Server.ResponsePackNew responsePackNew = null; new LogicView.TipPopView().TipBox(StringId.tip, StringId.delAutomation, () => { - LogicMethod.RemoveAllView(); - Logic.LogicList.Remove(Logic.currlogic); - MainView.MainShow(); - //鍙戦�佸垹闄ら�昏緫鍛戒护锛� + loading.Start(); + new System.Threading.Thread(() => + { + try + { + //鍙戦�佸垹闄ら�昏緫鍛戒护锛� + responsePackNew = Send.delLogic(Logic.currlogic); + + } + catch { } + finally + { + Application.RunOnMainThread(() => + { + loading.Hide(); + if (responsePackNew != null && responsePackNew.Code == "0") + { + LogicMethod.RemoveAllView(); + Logic.LogicList.Remove(Logic.currlogic); + MainView.MainShow(); + //鍙戦�佸垹闄ら�昏緫鍛戒护锛� + } + else + { + new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.delFail)); + } + }); + } + + }) + { IsBackground = true }.Start(); + }); }; -- Gitblit v1.8.0