From 598329348fef499fb9fccbef75a0bb3d53bd50b0 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期三, 03 八月 2022 17:40:05 +0800
Subject: [PATCH] 紧急求助按钮修复
---
HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs | 17 ++++++++
HDL-ON_Android/Properties/AndroidManifest.xml | 2
HDL_ON/Entity/Function/Function.cs | 1
HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs | 5 ++
HDL_ON/UI/UI2/1-HomePage/HomePage.cs | 18 +++++++--
HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorPirPage.cs | 18 +++++++++
HDL_ON/UI/UI2/FuntionControlView/Panel/PanelHelpPage.cs | 2
HDL_ON/DAL/DriverLayer/Control.cs | 1
HDL_ON/UI/MainPage.cs | 2
9 files changed, 58 insertions(+), 8 deletions(-)
diff --git a/HDL-ON_Android/Properties/AndroidManifest.xml b/HDL-ON_Android/Properties/AndroidManifest.xml
index 0af7d69..0729416 100644
--- a/HDL-ON_Android/Properties/AndroidManifest.xml
+++ b/HDL-ON_Android/Properties/AndroidManifest.xml
@@ -1,5 +1,5 @@
锘�<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.5.9" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202207291">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.6.0" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202208031">
<uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" />
<!--鍙嬬洘-->
<!--<uses-sdk android:minSdkVersion="8"></uses-sdk>-->
diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs
index 9e2364b..2b0623c 100644
--- a/HDL_ON/DAL/DriverLayer/Control.cs
+++ b/HDL_ON/DAL/DriverLayer/Control.cs
@@ -1281,6 +1281,7 @@
case SPK.HvacAirFresh:
case SPK.SensorGas:
case SPK.HvacCac:
+ case SPK.SensorHelp:
//璁惧鐘舵�佹帹閫�
//鐘舵�佹洿鏂�
Stan.HdlDeviceStatuPushLogic.Current.UpdateDeviceStatu(updateTemp.sid, updateTemp.status);
diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
index ba20bf1..b9716b4 100644
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -1600,6 +1600,7 @@
var spkList = new List<string>();
//spkList.Add(SensorLight);
spkList.Add(SensorPir);
+ spkList.Add(SensorHelp);
spkList.Add(SensorDoorWindow);
spkList.Add(SensorSmoke);
spkList.Add(SensorWater);
diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs
index 5121da4..573664e 100644
--- a/HDL_ON/UI/MainPage.cs
+++ b/HDL_ON/UI/MainPage.cs
@@ -26,7 +26,7 @@
/// <summary>
/// 鐗堟湰鍙�
/// </summary>
- public static string VersionString = "1.5.9";
+ public static string VersionString = "1.6.0";
///// <summary>
///// 瀹㈡埛绔被鍨�
///// </summary>
diff --git a/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs b/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
index 0567578..49d4fc1 100644
--- a/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
+++ b/HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
@@ -148,6 +148,11 @@
pirPage.ShowColltionButton = false;
pirPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
break;
+ case SPK.SensorHelp:
+ var helpPage = new PanelHelpPage();
+ helpPage.ShowColltionButton = false;
+ helpPage.AddForm(function, btnCollectionIcon, btnName, btnFromFloor);
+ break;
case SPK.SensorWater:
var waterPage = new SensorWaterImmersionPage();
waterPage.ShowColltionButton = false;
diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
index e44aaf9..7c631aa 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -1047,10 +1047,10 @@
btnbg.SelectedImagePath = "Collection/FunctionArmOnbg.png";
}
- if (!function.online)
- {
- btnbg.UnSelectedImagePath = "Collection/FunctionOfflineBg.png";
- }
+ //if (!function.online)
+ //{
+ // btnbg.UnSelectedImagePath = "Collection/FunctionOfflineBg.png";
+ //}
}
if (index == 0)
@@ -1456,6 +1456,16 @@
btnState.SelectedTextColor = CSS_Color.MainBackgroundColor;
btnState.TextColor = CSS_Color.MainColor;//PromptingColor1
}
+
+ //绱ф�ユ眰鍔�
+ else if (function.spk == SPK.SensorHelp)
+ {
+ btnName.TextColor = CSS_Color.MainBackgroundColor;
+ btnName.SelectedTextColor = CSS_Color.MainBackgroundColor;
+ btnIcon.UnSelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_white.png";
+ btnIcon.SelectedImagePath = $"FunctionIcon/Icon/HomeIcon/{function.IconName}_white.png";
+ }
+
else
{
Button btnSwitch;
diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
index dbba017..afe7efb 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -446,6 +446,14 @@
}
}
}
+ else if(function.spk == SPK.SensorHelp)
+ {
+ var tempStatus = function.attributes.Find((sta) => sta.key == FunctionAttributeKey.AlarmStatus);
+ if(tempStatus != null)
+ {
+ state = tempStatus.curValue.ToString() == "alarm";
+ }
+ }
else
{
state = function.trait_on_off.curValue.ToString() == "on";
@@ -466,7 +474,14 @@
{
if (function.spk != SPK.LightSwitch)
{
- btn.Text = function.lastState;
+ if (function.spk == SPK.SensorHelp)
+ {
+ btn.TextID = StringId.InAlarming;
+ }
+ else
+ {
+ btn.Text = function.lastState;
+ }
}
}
}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorPirPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorPirPage.cs
index 891b2cf..546e051 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorPirPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorPirPage.cs
@@ -133,6 +133,24 @@
btnSuctionView.IsSelected = false;
}
}
+
+
+ else
+ {
+ temp = device.attributes.Find((sta) => sta.key == FunctionAttributeKey.AlarmStatus);
+ if (temp.state == "true")
+ {
+ btnIcon.IsSelected = true;
+ btnSuctionView.TextID = StringId.InAlarming;
+ btnSuctionView.IsSelected = true;
+ }
+ else
+ {
+ btnIcon.IsSelected = false;
+ btnSuctionView.TextID = StringId.SensorNormalState;
+ btnSuctionView.IsSelected = false;
+ }
+ }
});
}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Panel/PanelHelpPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Panel/PanelHelpPage.cs
index 1350a45..c52b051 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Panel/PanelHelpPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Panel/PanelHelpPage.cs
@@ -4,7 +4,7 @@
using HDL_ON.UI.CSS;
using Shared;
-namespace HDL_ON.UI.UI2.FuntionControlView.Panel
+namespace HDL_ON.UI
{
public class PanelHelpPage : DeviceFunctionCardCommonForm
{
--
Gitblit v1.8.0