From 17c8d94258154ab2e9f6d2cf821202c873b9f118 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期三, 16 十二月 2020 15:39:15 +0800
Subject: [PATCH] 22222
---
HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs | 46 ++++++++++++++++++++++++++++++++++------------
1 files changed, 34 insertions(+), 12 deletions(-)
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs
index 24724ca..213d4ad 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs
@@ -95,21 +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, () =>
{
- var responsePackNew= Send.delLogic(Logic.currlogic);
- if (responsePackNew.Code == "0")
+ loading.Start();
+ new System.Threading.Thread(() =>
{
- LogicMethod.RemoveAllView();
- Logic.LogicList.Remove(Logic.currlogic);
- MainView.MainShow();
- //鍙戦�佸垹闄ら�昏緫鍛戒护锛�
- }
- else
- {
- new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.delFail));
- }
+ 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