From 12bda302564e919a0ba8157957df3d2ee7382909 Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期二, 14 九月 2021 15:27:51 +0800
Subject: [PATCH] 2021-09-14 1.增加物业公告推送对接
---
HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorDoorWinwsPage.cs | 43 +++++++++++++++++++++++++++++++++++--------
1 files changed, 35 insertions(+), 8 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorDoorWinwsPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorDoorWinwsPage.cs
index e6ae4b0..57a3ff5 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorDoorWinwsPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorDoorWinwsPage.cs
@@ -2,6 +2,8 @@
using HDL_ON.Stan;
using HDL_ON.UI.CSS;
using HDL_ON.Entity;
+using System.Collections.Generic;
+using System;
namespace HDL_ON.UI
{
@@ -27,7 +29,7 @@
/// </summary>
public override void InitFrameWhiteContent()
{
- base.SetTitleText(device.name);
+ base.SetTitleText(Language.StringByID(StringId.Sensor));
//娣诲姞绗簩绱㈠紩椤�
this.AddSecondPage();
@@ -40,6 +42,12 @@
this.RefreshNowDeviceStatuMemory(this.device);
//鍒锋柊鐣岄潰鐘舵��
this.RefreshFormStatu();
+ //璇诲彇鐘舵��
+ new System.Threading.Thread(() =>
+ {
+ DriverLayer.Control.Ins.SendReadCommand(device);
+ })
+ { IsBackground = true }.Start();
}
/// <summary>
@@ -73,6 +81,8 @@
/// </summary>
private void InitFrameWhiteContent2()
{
+ var paging = new ArmSensorHistroyPaging(device);
+ paging.InitFrame(FrameWhiteCentet2);
}
#endregion
@@ -108,10 +118,10 @@
private void RefreshFormStatu()
{
Application.RunOnMainThread(() => {
- var temp = device.status.Find((sta) => sta.key == FunctionAttributeKey.Status);
+ var temp = device.attributes.Find((sta) => sta.key == FunctionAttributeKey.Status);
if (temp != null)
{
- if (temp.value == "true")
+ if (temp.state == "open")
{
btnIcon.IsSelected = true;
btnSuctionView.TextID = StringId.Open;
@@ -136,13 +146,30 @@
/// </summary>
private void RefreshNowDeviceStatuMemory(Function i_LocalDevice)
{
- foreach (var data in i_LocalDevice.status)
- {
- //寮�鍏�
- //if (data.key == "on_off") { this.weepRobotData.Cleaning = data.value.ToLower() == "on"; }
- }
+ //foreach (var data in i_LocalDevice.status)
+ //{
+ // if (data.key == FunctionAttributeKey.Status)
+ // {
+ // Application.RunOnMainThread(() =>
+ // {
+ // if (data.value.ToLower() == "open")
+ // {
+ // this.btnIcon.IsSelected = true;
+ // this.btnSuctionView.IsSelected = true;
+ // this.btnSuctionView.TextID = StringId.Open;
+ // }
+ // else
+ // {
+ // this.btnIcon.IsSelected = false;
+ // this.btnSuctionView.IsSelected = false;
+ // this.btnSuctionView.TextID = StringId.Close;
+ // }
+ // });
+ // }
+ //}
}
#endregion
}
+
}
--
Gitblit v1.8.0