From 01c46e7bfe9aa8fb20b29f70c83c03a307af548a Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期二, 22 十二月 2020 16:35:16 +0800
Subject: [PATCH] 2020-12-22 1.更新。
---
HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs | 43 +++++++++++++++++++++++++------------------
1 files changed, 25 insertions(+), 18 deletions(-)
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
old mode 100644
new mode 100755
index 133eb88..f6bb95b
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
@@ -184,6 +184,21 @@
///淇濆瓨鐐瑰嚮浜嬩欢
saveView.btnClick.MouseUpEventHandler += (sender, e) =>
{
+ if (Logic.currlogic.input.Count == 0&& Logic.currlogic.output.Count == 0)
+ {
+ new LogicView.TipPopView().TipBox(StringId.tip, StringId.conditioncNullOrtargetNull);
+ return;
+ }
+ if (Logic.currlogic.input.Count == 0)
+ {
+ new LogicView.TipPopView().TipBox(StringId.tip, StringId.conditioncNull);
+ return;
+ }
+ if (Logic.currlogic.output.Count == 0)
+ {
+ new LogicView.TipPopView().TipBox(StringId.tip, StringId.targetNull);
+ return;
+ }
Loading loading = new Loading();
this.AddChidren(loading);
HDL_ON.DAL.Server.ResponsePackNew responsePackNew = null;
@@ -226,7 +241,7 @@
//鏁版嵁杩斿簭鍒楀寲涓篖ogic瀵硅薄
var str = Newtonsoft.Json.JsonConvert.SerializeObject(jay);
var logic = Newtonsoft.Json.JsonConvert.DeserializeObject<Logic>(str);
- if (logic.userLogicId!="")
+ if (logic.userLogicId != "")
{
//鏇存柊浜戠鍞竴鑷姩鍖杋d;
Logic.currlogic.userLogicId = logic.userLogicId;
@@ -242,6 +257,10 @@
Logic.LogicList.Add(Logic.currlogic);
LogicMethod.RemoveAllView();
MainView.MainShow();
+ }
+ else if (responsePackNew != null && responsePackNew.Code == "14005")
+ {
+ new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.gatewayNotOnline));
}
else
{
@@ -279,7 +298,11 @@
LogicMethod.RemoveAllView();
MainView.MainShow();
}
- else
+ else if (responsePackNew != null && responsePackNew.Code == "14005")
+ {
+ new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.gatewayNotOnline));
+ }
+ else
{
new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.saveFail));
}
@@ -611,21 +634,5 @@
return stateList;
}
- /// <summary>
- /// 鐏拌壊寮规鐖舵帶浠�
- /// </summary>
- /// <param name="frame">鏄剧ず鍦ㄥ摢涓晫闈�</param>
- /// <returns></returns>
- public FrameLayout GetFrame(FrameLayout frame, string tagKey)
- {
- FrameLayout fLayout = new FrameLayout
- {
- BackgroundColor = CSS.CSS_Color.viewTrans60lucence,
- Tag = tagKey,
-
- };
- frame.AddChidren(fLayout);
- return fLayout;
- }
}
}
--
Gitblit v1.8.0