From 3055ac3c5a7a18db21f2adc6a36f68ae0fd708c2 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期五, 06 五月 2022 14:48:58 +0800
Subject: [PATCH] 定制
---
HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs | 44 ++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
index aa40d9a..de866dd 100644
--- a/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
+++ b/HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs
@@ -54,6 +54,7 @@
/// <summary>
/// 鍔犺浇鍔熻兘绫诲瀷鎺у埗鍗$墖
+ /// Tag 鍔熻兘灞炴�ф樉绀�
/// </summary>
public void LoadFunctionDiv()
{
@@ -76,8 +77,7 @@
{//闊充箰娌℃湁寮�鍏虫寜閽�
MusicFragment();
}
- else if (SPK.EvironmentSensorList().Contains(function.spk) || SPK.ArmSensorSpkList().Contains(function.spk)
- || SPK.PanelSpkList().Contains(function.spk)) //浼犳劅鍣ㄦ病鏈夊紑鍏虫寜閽�)
+ else if (SPK.EvironmentSensorList().Contains(function.spk) || SPK.ArmSensorSpkList().Contains(function.spk)) //浼犳劅鍣ㄦ病鏈夊紑鍏虫寜閽�)
{
var powerLowTipAttr = function.attributes.Find((obj) => obj.key == FunctionAttributeKey.BatteryState);
if (powerLowTipAttr != null)
@@ -101,6 +101,46 @@
{
btnIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/DoorLock.png";
}
+ else if(SPK.PanelSpkList().Contains(function.spk))//鏅鸿兘闈㈡澘璁惧
+ {
+ var powerLowTipAttr = function.attributes.Find((obj) => obj.key == FunctionAttributeKey.BatteryState);
+ if (powerLowTipAttr != null)
+ {
+ if (powerLowTipAttr.state.ToLower() == "low")
+ {
+ Button btnTipPowerLow = new Button()
+ {
+ X = Application.GetRealWidth(307),
+ Y = Application.GetRealHeight(70),
+ Width = Application.GetRealWidth(24),
+ Height = Application.GetRealWidth(24),
+ UnSelectedImagePath = "FunctionIcon/ArmSensor/PowerLowIcon.png",
+ SelectedImagePath = "FunctionIcon/ArmSensor/PowerLowIcon.png",
+ };
+ this.AddChidren(btnTipPowerLow);
+ }
+ }
+ var alarmStatusAttr = function.GetAttribute("alarm_status");
+ if(alarmStatusAttr !=null)
+ {
+ var btnAlarmStatus = new Button()
+ {
+ X = Application.GetRealWidth(8 + 10 + 32),
+ Y = Application.GetRealHeight(53),
+ Width = Application.GetRealWidth(200),
+ Height = Application.GetRealHeight(24),
+ TextAlignment = TextAlignment.CenterLeft,
+ TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel,
+ Tag = "AlarmStatus"
+ };
+ if(alarmStatusAttr.state == "alarm")
+ {
+ btnAlarmStatus.TextID = StringId.InAlarm;
+ btnAlarmStatus.TextColor = CSS_Color.WarningColor;
+ }
+ bodyDiv.AddChidren(btnAlarmStatus);
+ }
+ }
else
{
if (function.spk == SPK.ClothesHanger)//鏅捐。鏋�
--
Gitblit v1.8.0