From a3f51a59941dbe3138e71328baa8f6c7a3d0f9b0 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期三, 02 十二月 2020 17:50:43 +0800
Subject: [PATCH] 2020-12-02-3
---
HDL-ON_Android/Assets/Phone/Public/.DS_Store | 0
HDL-ON_iOS/Resources/Language.ini | 2 +
HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs | 17 ++++++--
HDL-ON_Android/Assets/Language.ini | 2 +
HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs | 11 ++++-
HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TipPopView.cs | 18 +++++++--
HDL_ON/Common/R.cs | 2 +
.vs/HDL_APP_Project/xs/UserPrefs.xml | 28 ++++++-------
HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs | 9 +++-
9 files changed, 59 insertions(+), 30 deletions(-)
diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index cc06506..07375e4 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,36 +1,34 @@
锘�<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default">
- <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/AddOutputInputView.cs">
- <Files>
- <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" Line="526" Column="18" />
- <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs" Line="205" Column="22" />
- <File FileName="HDL_ON/DAL/Server/NewAPI.cs" Line="1" Column="1" />
- <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs" Line="12" Column="24" />
- <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/Logic.cs" Line="10" Column="1" />
- <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/AddTarget.cs" Line="1" Column="1" />
- <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs" Line="73" Column="21" />
- <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs" Line="19" Column="76" />
- <File FileName="HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/AddOutputInputView.cs" Line="10" Column="57" />
- </Files>
+ <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.D4411691-F5B8-40F4-97C1-964F33115DBC" />
+ <MonoDevelop.Ide.Workbench>
<Pads>
<Pad Id="ProjectPad">
<State name="__root__">
<Node name="HDL_APP_Project" expanded="True">
<Node name="HDL_ON" expanded="True">
+ <Node name="Common" expanded="True" />
<Node name="DAL" expanded="True">
<Node name="Server" expanded="True" />
</Node>
<Node name="UI" expanded="True">
+ <Node name="UI0-Public" expanded="True" />
<Node name="UI2" expanded="True">
<Node name="3-Intelligence" expanded="True">
<Node name="Automation" expanded="True">
- <Node name="LogicView" expanded="True">
- <Node name="AddOutputInputView.cs" selected="True" />
- </Node>
+ <Node name="LogicView" expanded="True" />
+ <Node name="AddLogic.cs" selected="True" />
</Node>
</Node>
+ <Node name="FuntionControlView" expanded="True" />
</Node>
</Node>
</Node>
+ <Node name="HDL-ON_Android" expanded="True">
+ <Node name="Assets" expanded="True" />
+ </Node>
+ <Node name="HDL-ON_iOS" expanded="True">
+ <Node name="Resources" expanded="True" />
+ </Node>
</Node>
</State>
</Pad>
diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini
index ad318ec..ee80ebc 100644
--- a/HDL-ON_Android/Assets/Language.ini
+++ b/HDL-ON_Android/Assets/Language.ini
@@ -486,6 +486,8 @@
7049=鏄惁瑕佸垹闄よ嚜鍔ㄥ寲锛�
7050=娣诲姞鍦烘櫙
7051=寤舵椂
+7052=淇濆瓨澶辫触锛岃閲嶈瘯
+7053=鍒犻櫎澶辫触锛岃閲嶈瘯
diff --git a/HDL-ON_Android/Assets/Phone/Public/.DS_Store b/HDL-ON_Android/Assets/Phone/Public/.DS_Store
new file mode 100644
index 0000000..3cc30ee
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/Public/.DS_Store
Binary files differ
diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini
index 32d8afe..4090615 100644
--- a/HDL-ON_iOS/Resources/Language.ini
+++ b/HDL-ON_iOS/Resources/Language.ini
@@ -485,6 +485,8 @@
7049=鏄惁瑕佸垹闄よ嚜鍔ㄥ寲锛�
7050=娣诲姞鍦烘櫙
7051=寤舵椂
+7052=淇濆瓨澶辫触锛岃閲嶈瘯
+7053=鍒犻櫎澶辫触锛岃閲嶈瘯
9000=璇蜂娇鐢ㄦ柊鐨勬墜鏈鸿处鍙风櫥褰旳PP
diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs
index aa54a49..ac35348 100644
--- a/HDL_ON/Common/R.cs
+++ b/HDL_ON/Common/R.cs
@@ -479,6 +479,8 @@
public const int delAutomation = 7049;
public const int addSceneLogic = 7050;
public const int delayLogic = 7051;
+ public const int saveFail = 7052;
+ public const int delFail = 7053;
#region LE鏂板
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
index f8d382d..c5d0b6e 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/AddLogic.cs
@@ -174,6 +174,7 @@
{
Logic.currlogic.name = logicName;
Logic.currlogic.sid = LogicMethod.NewSid();
+ //鍙戦�佹柊鍔犱慨鏀归�昏緫鍛戒护锛�
var responsePackNew = Send.AddLogic(Logic.currlogic);
if (responsePackNew.Code == "0")
{
@@ -181,21 +182,25 @@
LogicMethod.RemoveAllView();
MainView.MainShow();
}
- //鍙戦�佹柊鍔犱慨鏀归�昏緫鍛戒护锛�
+ else {
+ new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.saveFail));
+ }
});
}
else
{
-
+ //鍙戦�佹柊鍔犱慨鏀归�昏緫鍛戒护锛�
var responsePackNew = Send.updateLogic(Logic.currlogic);
if (responsePackNew.Code == "0")
{
LogicMethod.RemoveAllView();
MainView.MainShow();
}
- //鍙戦�佹柊鍔犱慨鏀归�昏緫鍛戒护锛�
+ else {
+ new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.saveFail));
+ }
}
};
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TipPopView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TipPopView.cs
index 9603b0c..54fb5ad 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TipPopView.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/LogicView/TipPopView.cs
@@ -1,5 +1,6 @@
锘縰sing System;
using System.Collections.Generic;
+using System.Threading;
using HDL_ON.UI.CSS;
using Shared;
@@ -52,7 +53,7 @@
X = Application.GetRealWidth(35),
Height = Application.GetRealHeight(22),
Width = Application.GetRealWidth(200),
- TextColor =CSS_Color.textConfirmColor,
+ TextColor = CSS_Color.textConfirmColor,
TextSize = TextSize.text16,
TextAlignment = TextAlignment.Center,
TextID = titleId,
@@ -116,7 +117,7 @@
Width = Application.GetRealWidth(135),
Height = Application.GetRealHeight(44),
TextAlignment = TextAlignment.Center,
- TextColor =CSS_Color.textTipColor,
+ TextColor = CSS_Color.textTipColor,
TextSize = TextSize.text16,
TextID = StringId.cancelMusic,
Gravity = Gravity.BottomLeft,
@@ -401,7 +402,7 @@
X = Application.GetRealWidth(20),
Height = Application.GetRealHeight(22),
Width = Application.GetRealWidth(270 - 20 * 2),
- TextColor =CSS_Color.textTipColor,
+ TextColor = CSS_Color.textTipColor,
TextSize = TextSize.text12,
TextAlignment = TextAlignment.Center,
TextID = tipTxet,
@@ -423,7 +424,7 @@
Width = Application.GetRealWidth(135),
Height = Application.GetRealHeight(44),
TextAlignment = TextAlignment.Center,
- TextColor =CSS_Color.textTipColor,
+ TextColor = CSS_Color.textTipColor,
TextSize = TextSize.text16,
TextID = StringId.cancelMusic,
Gravity = Gravity.BottomLeft,
@@ -565,5 +566,14 @@
};
}
+
+ /// <summary>
+ /// 淇℃伅鎻愮ず绐楀彛锛岃嚜鍔ㄥ叧闂�
+ /// </summary>
+ /// <param name="msg">鎻愮ず閿欒鏂囨湰</param>
+ public void FlashingBox(string msg)
+ {
+ new PublicAssmebly().TipMsgAutoClose(msg, false, 2000);
+ }
}
}
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
index 35d231b..2025a0a 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/MainView.cs
@@ -34,11 +34,12 @@
};
//鑾峰彇鑷姩鍖栧垪琛�
GetLogicList();
+ // for (int i = Logic.LogicList.Count-1; i >= 0; i--)闄嶅簭鎺掑垪
for (int i = 0; i < Logic.LogicList.Count; i++)
{
var currLogic = Logic.LogicList[i];
///涓婁笅闂撮殧12鍍忕礌
- vv.AddChidren(new FrameLayout { Height = Application.GetRealHeight(12)});
+ vv.AddChidren(new FrameLayout { Height = Application.GetRealHeight(12) });
LogicView.SingleLogicView logicView = new LogicView.SingleLogicView();
vv.AddChidren(logicView.FLayoutView());
logicView.btnLogicName.Text = currLogic.name;
@@ -66,10 +67,12 @@
logicView.btnSwitchIcon.IsSelected = false;
currLogic.enable = "false";
}
- Send.switchLogic(currLogic);
+ Send.switchLogic(currLogic);
};
- if (Logic.LogicList.Count-1==i) {
+ //if (i==0)闄嶅簭鎺掑垪
+ if (Logic.LogicList.Count - 1 == i)
+ {
///鏈�鍚庝竴涓窛绂绘渶搴曢儴12,鐣岄潰鏄剧ず鏁堟灉浣滅敤;
vv.AddChidren(new FrameLayout { Height = Application.GetRealHeight(12) });
}
diff --git a/HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs b/HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs
index acd9170..bb62490 100644
--- a/HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs
+++ b/HDL_ON/UI/UI2/3-Intelligence/Automation/Set.cs
@@ -98,11 +98,18 @@
new LogicView.TipPopView().TipBox(StringId.tip, StringId.delAutomation, () =>
{
- Send.delLogic(Logic.currlogic);
- LogicMethod.RemoveAllView();
- Logic.LogicList.Remove(Logic.currlogic);
- MainView.MainShow();
- //鍙戦�佸垹闄ら�昏緫鍛戒护锛�
+ var responsePackNew= Send.delLogic(Logic.currlogic);
+ if (responsePackNew.Code == "0")
+ {
+ LogicMethod.RemoveAllView();
+ Logic.LogicList.Remove(Logic.currlogic);
+ MainView.MainShow();
+ //鍙戦�佸垹闄ら�昏緫鍛戒护锛�
+ }
+ else
+ {
+ new LogicView.TipPopView().FlashingBox(Language.StringByID(StringId.delFail));
+ }
});
};
--
Gitblit v1.8.0