From 263401d40b2d9d2c1b36a24f33d45c5cb7192518 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期三, 23 十二月 2020 15:51:54 +0800
Subject: [PATCH] 20201223-6
---
HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs | 49 +++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 41 insertions(+), 8 deletions(-)
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs
old mode 100644
new mode 100755
index acd9170..15253d8
--- 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,14 +95,47 @@
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, () =>
{
- Send.delLogic(Logic.currlogic);
- 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 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