From 675df74cdd4103ffdcbfa0a6ccfc105fd61af15a Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期五, 29 十月 2021 15:44:18 +0800
Subject: [PATCH] 2021-10-29 1.更新乐橙 AndroidSDK
---
HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddAlarmDeploymentPage.cs | 75 +++++++++++++++++++------------------
1 files changed, 39 insertions(+), 36 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddAlarmDeploymentPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddAlarmDeploymentPage.cs
index d47f84d..91f18dc 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddAlarmDeploymentPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddAlarmDeploymentPage.cs
@@ -153,8 +153,11 @@
//甯冮槻鍔熻兘
iniDefenseView();
+
+#if DEBUG
//鍛婅鐩爣
iniAlarmView();
+#endif
#region 搴曢儴鍖哄煙
var bottomView = new FrameLayout()
@@ -183,29 +186,40 @@
btnConfrim.MouseUpEventHandler = (sender, e) =>
{
+ if (string.IsNullOrEmpty( securityAlarm.name ))
+ {
+ var tip = new Tip()
+ {
+ Text = Language.StringByID(StringId.PleaseEnterSecurityName),// = "璇疯緭鍏ュ畨闃插悕绉�",
+ CloseTime = 3,
+ Direction = AMPopTipDirection.None
+ };
+ tip.Show(MainPage.BaseView);
+ return;
+ }
+
if (securityAlarm.input.Count == 0)
{
var tip = new Tip()
{
- Text = "璇烽�夋嫨甯冮槻鐩爣",
+ Text = Language.StringByID(StringId.PleaseSelectTheDeploymentTarget),// "璇烽�夋嫨甯冮槻鐩爣",
CloseTime = 3,
Direction = AMPopTipDirection.None
};
tip.Show(MainPage.BaseView);
return;
}
- if (securityAlarm.output.Count == 0)
- {
- var tip = new Tip()
- {
- Text = "璇烽�夋嫨鍛婅鐩爣",
- CloseTime = 3,
- Direction = AMPopTipDirection.None
- };
- tip.Show(MainPage.BaseView);
-
- return;
- }
+ //if (securityAlarm.output.Count == 0)
+ //{
+ // var tip = new Tip()
+ // {
+ // Text = "璇烽�夋嫨鍛婅鐩爣",
+ // CloseTime = 3,
+ // Direction = AMPopTipDirection.None
+ // };
+ // tip.Show(MainPage.BaseView);
+ // return;
+ //}
var waitPage = new Loading();
waitPage.Start();
@@ -216,7 +230,7 @@
var code = securityAlarm.SaveInfo();
if (code == StateCode.SUCCESS)
{
- SecurityCenter.Security.GetSecurityAlarmList();
+ Common.ApiUtlis.Ins.GetSecurityList();
Application.RunOnMainThread(() =>
{
this.RemoveFromParent();
@@ -235,7 +249,11 @@
finally
{
Application.RunOnMainThread(() => {
- waitPage.Hide();
+ if (waitPage != null)
+ {
+ waitPage.RemoveFromParent();
+ waitPage = null;
+ }
});
}
})
@@ -317,7 +335,10 @@
{
foreach (var target in securityAlarm.input)
{
- inputTargetView.AddChidren(new InputRow(target.GetFunction().name, target.GetFunction().GetRoomListName(),target.StateText()));
+ if (target.GetFunction() != null)
+ {
+ inputTargetView.AddChidren(new InputRow(target.GetFunction().name, target.GetFunction().GetRoomListName(), target.StateText()));
+ }
}
inputTargetView.Height = Application.GetRealHeight(65 * securityAlarm.input.Count);
//if (outputTargetView != null)
@@ -469,25 +490,7 @@
btnDeploymentName.MouseUpEventHandler = eventHandler;
}
- /// <summary>
- /// 娣诲姞瀹夐槻
- /// </summary>
- void LoadEvent_AddDefense()
- {
- var responsePack = new HttpServerRequest().AddSecurity(new List<SecurityAlarm>() { securityAlarm});
- if (responsePack.Code == StateCode.SUCCESS)
- {
- Application.RunOnMainThread(() =>
- {
- this.RemoveFromParent();
- });
- }
- else
- {
- IMessageCommon.Current.ShowErrorInfoAlter(responsePack.Code);
- }
- }
-
+
}
/// <summary>
@@ -533,7 +536,7 @@
Button btnState = new Button()
{
- Width = Application.GetRealWidth(369),
+ Width = Application.GetRealWidth(360),
TextAlignment = TextAlignment.CenterRight,
TextSize = CSS_FontSize.TextFontSize,
TextColor = CSS_Color.FirstLevelTitleColor,
--
Gitblit v1.8.0