From 2a900e186e9ddf97facd33082df063183c7483b8 Mon Sep 17 00:00:00 2001
From: wxr <wxr@hdlchina.com.cn>
Date: 星期五, 27 九月 2024 09:51:56 +0800
Subject: [PATCH] 阿里云日志,注册
---
HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs | 68 +++++++++++++++++++++++++++++++++-
1 files changed, 66 insertions(+), 2 deletions(-)
diff --git a/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs b/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs
index ffd324b..25b3591 100644
--- a/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs
+++ b/HDL_ON/UI/UI2/2-Classification/ClassificaitionPublicBLL.cs
@@ -193,7 +193,7 @@
switch (tempStatus.state)
{//0绌猴紝1璧帮紝2璺戯紝3鍧愶紝4璺屽�掞紝5绔�
case "0":
- btnStatus.TextID = StringId.SensorNormalState;
+ btnStatus.TextID = StringId.wuren;
btnStatus.TextColor = CSS_Color.MainColor;
break;
case "1":
@@ -245,6 +245,70 @@
catch (Exception ex)
{
MainPage.Log($"{this.GetType()} error 3 : {ex.Message}");
+ }
+ }
+ }
+
+ else if (SPK.ArmSensorSpkList().Contains(updataFunction.spk))
+ {
+ if (cTag == updataFunction.sid + "_Sensor_Status")
+ {
+ Button btnStatus = (fcView.GetChildren(j) as Button);
+
+ var alarm_status = updataFunction.attributes.Find((sta) => sta.key == FunctionAttributeKey.AlarmStatus);
+ if (alarm_status != null)
+ {
+ if (alarm_status.curValue.ToString() == "normal")
+ {
+ btnStatus.TextID = StringId.SensorNormalState;
+ btnStatus.TextColor = CSS_Color.MainColor;
+ }
+ else
+ {
+ btnStatus.TextID = StringId.InAlarm;
+ btnStatus.TextColor = CSS_Color.WarningColor;
+ }
+ }
+ else
+ {
+ alarm_status = updataFunction.attributes.Find((sta) => sta.key == "contact_status");
+ if (alarm_status != null)
+ {
+ if (alarm_status.curValue.ToString() == "close")
+ {
+ btnStatus.TextID = StringId.Shut;
+ btnStatus.TextColor = CSS_Color.MainColor;
+ }
+ else
+ {
+ if (updataFunction.spk == SPK.SensorDryContact || updataFunction.spk == SPK.SensorDryContact2)
+ {
+ btnStatus.TextID = StringId.DryBreak;
+ }
+ else
+ {
+ btnStatus.TextID = StringId.Open;
+ }
+ btnStatus.TextColor = CSS_Color.WarningColor;
+ }
+ }
+ else
+ {
+ alarm_status = updataFunction.attributes.Find((sta) => sta.key == "people_status");
+ if (alarm_status != null)
+ {
+ if (alarm_status.curValue.ToString() == "false")
+ {
+ btnStatus.TextID = StringId.wuren;
+ btnStatus.TextColor = CSS_Color.MainColor;
+ }
+ else
+ {
+ btnStatus.TextID = StringId.youren;
+ btnStatus.TextColor = CSS_Color.WarningColor;
+ }
+ }
+ }
}
}
}
@@ -304,7 +368,7 @@
{
if (scrolView.GetChildren(i).GetType() == typeof(FunctionControlZone)) {
var fcView = scrolView.GetChildren(i) as FunctionControlZone;
- fcView.UpdataOnline(updataFunction.online);
+ fcView.UpdataOnline(updataFunction.isOnline());
}
}
}
--
Gitblit v1.8.0