From 8d68145cc5e007bfc662ef8bb436b716519f956e Mon Sep 17 00:00:00 2001
From: hxb <hxb@hdlchina.com.cn>
Date: 星期三, 14 六月 2023 12:01:41 +0800
Subject: [PATCH] 增加阿里云日志
---
HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs | 82 ++++++++++++++++++++++++++++++++++++-----
1 files changed, 72 insertions(+), 10 deletions(-)
diff --git a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
index 3f85a44..3bf20a9 100644
--- a/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
+++ b/HDL_ON/UI/UI2/1-HomePage/HomePageBLL.cs
@@ -400,11 +400,58 @@
if (function.GetAttribute(FunctionAttributeKey.Percent) != null)
{
state = function.GetAttrState(FunctionAttributeKey.Percent) != "0";
- }else
+ }
+ else
{
if (function.GetAttrState(FunctionAttributeKey.OnOff) == "stop")
return;
state = function.trait_on_off.curValue.ToString() == "on";
+ }
+ }
+ else if (function.spk == SPK.SenesorMegahealth || function.spk == SPK.SensorMmvPose)
+ {
+
+ var tempStatus = function.attributes.Find((sta) => sta.key == FunctionAttributeKey.TargetStatus);
+ if (tempStatus != null)
+ {
+ switch (tempStatus.state)
+ {//0绌猴紝1璧帮紝2璺戯紝3鍧愶紝4璺屽�掞紝5绔�
+ case "0":
+ state = false;
+ break;
+ case "1":
+ state = true;
+ break;
+ case "2":
+ if (function.extSet.labModel)
+ {
+ state = true;
+ }
+ break;
+ case "3":
+ if (function.extSet.labModel)
+ {
+ state = true;
+ }
+ break;
+ case "4":
+ state = true;
+ break;
+ case "5":
+ if (function.extSet.labModel)
+ {
+ state = true;
+ }
+ break;
+ }
+ }
+ }
+ 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
@@ -427,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;
+ }
}
}
}
@@ -550,14 +604,14 @@
d.Add(FunctionAttributeKey.FadeTime, function.GetAttrState(FunctionAttributeKey.FadeTime));
Control.Ins.SendWriteCommand(function, d);
}
- else if (function.spk == SPK.PanelSocket)
- {
- if (function.attributes.Find((obj) => obj.key == "on_off_usb") != null)
- {
- d.Add("on_off_usb", function.trait_on_off.curValue.ToString());
- }
- Control.Ins.SendWriteCommand(function, d);
- }
+ //else if (function.spk == SPK.PanelSocket)//鍘绘帀锛岀粺涓�澶勭悊鎬绘帶
+ //{
+ // if (function.attributes.Find((obj) => obj.key == "on_off_usb") != null)
+ // {
+ // d.Add("on_off_usb", function.trait_on_off.curValue.ToString());
+ // }
+ // Control.Ins.SendWriteCommand(function, d);
+ //}
else
{
d.Add("on_off", function.trait_on_off.curValue.ToString());
@@ -764,6 +818,10 @@
/// </summary>
void GetUnreadPushMessages()
{
+ if (MainPage.NoLoginMode)
+ {
+ return;
+ }
System.Threading.Tasks.Task.Run(() =>
{
try
@@ -868,6 +926,10 @@
/// </summary>
void RegisterGetPushMessageAction()
{
+ if (MainPage.NoLoginMode)
+ {
+ return;
+ }
Action RegisterGetPushMessageAction = () => {
if (bodyView != null)
{
--
Gitblit v1.8.0