From 452e8cef1c740d18ee398be6971d9952e41dbd4a Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 12 四月 2023 16:11:50 +0800
Subject: [PATCH] 1
---
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