From b562a582ac3a288193e6e4f57c5eff8a344305a4 Mon Sep 17 00:00:00 2001
From: wxr <wxr@hdlchina.com.cn>
Date: 星期五, 27 九月 2024 13:52:17 +0800
Subject: [PATCH] Update AndroidManifest.xml
---
HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs | 211 ++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 202 insertions(+), 9 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs
index a547f49..6f57788 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SenesorMegahealthPage.cs
@@ -2,6 +2,8 @@
using HDL_ON.Stan;
using HDL_ON.UI.CSS;
using HDL_ON.Entity;
+using System;
+using HDL_ON.DAL.Server;
namespace HDL_ON.UI
{
@@ -17,6 +19,11 @@
/// 鏂囨湰鎺т欢
/// </summary>
private NormalViewControl btnSuctionView = null;
+ /// <summary>
+ /// 閫�鍑哄疄楠屽妯″紡鎺у埗鍖哄煙
+ /// </summary>
+ FrameLayout exitLabView;
+
#endregion
@@ -43,7 +50,7 @@
//璇诲彇鐘舵��
new System.Threading.Thread(() =>
{
- if (device.spk == SPK.SenesorMegahealth|| device.spk == SPK.SenesorMegahealth2)
+ if (device.spk == SPK.SenesorMegahealth || device.spk == SPK.SensorMmvPose || device.spk == SPK.SenesorMegahealth2)
{
DriverLayer.Control.Ins.SendReadCommand(device, true);
}
@@ -74,7 +81,113 @@
SelectedTextColor = CSS_Color.MainColor,
};
FrameWhiteCentet1.AddChidren(btnSuctionView);
+
+
+ //int i = 0;
+ //btnIcon.MouseUpEventHandler = (sender, e) => {
+ // device.GetAttribute(FunctionAttributeKey.TargetStatus).state = i.ToString();
+ // i++;
+ // RefreshFormStatu();
+ //};
+
+
+
+ var btnInstantaneousValue = new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Y = Application.GetRealHeight(391),
+ Width = Application.GetMinRealAverage(32),
+ Height = Application.GetMinRealAverage(32),
+ UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/DiagramIconOn.png",
+ };
+ FrameWhiteCentet1.AddChidren(btnInstantaneousValue);
+ var btnInstantaneousValueText = new Button()
+ {
+ Gravity = Gravity.CenterHorizontal,
+ Y = btnInstantaneousValue.Bottom,
+ Width = Application.GetRealWidth(96),
+ Height = Application.GetRealHeight(29),
+ TextAlignment = TextAlignment.Center,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ TextColor = CSS_Color.TextualColor,
+ TextID = StringId.AlarmDataStatistics,
+ IsMoreLines = true
+ };
+ FrameWhiteCentet1.AddChidren(btnInstantaneousValueText);
+ EventHandler<MouseEventArgs> eventHandler = (sender, e) => {
+ var page = new SensorMegahealth_AlarmDataStatisticsPage(device);
+ MainPage.BasePageView.AddChidren(page);
+ page.LoadPage();
+ MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+ };
+ btnInstantaneousValue.MouseUpEventHandler = eventHandler;
+ btnInstantaneousValueText.MouseUpEventHandler = eventHandler;
+
+
+ exitLabView = new FrameLayout()
+ {
+ Y = Application.GetRealHeight(391),
+ Height = Application.GetRealHeight(135),
+ BackgroundColor = CSS_Color.MainBackgroundColor,
+ Visible = device.extSet.labModel,
+ };
+ FrameWhiteCentet1.AddChidren(exitLabView);
+
+ var labTipText = new Button()
+ {
+ Y = Application.GetRealHeight(10),
+ Gravity = Gravity.CenterHorizontal,
+ Width = Application.GetRealWidth(250),
+ Height = Application.GetRealHeight(50),
+ TextColor = CSS_Color.TextualColor,
+ TextID = StringId.LabTipText,
+ IsMoreLines = true,
+ TextAlignment = TextAlignment.CenterLeft,
+ TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+ };
+ exitLabView.AddChidren(labTipText);
+
+ var btnExitLab = new Button()
+ {
+ Y = Application.GetRealHeight(75),
+ Gravity = Gravity.CenterHorizontal,
+ Width = Application.GetRealWidth(148),
+ Height = Application.GetRealHeight(40),
+ TextAlignment = TextAlignment.Center,
+ TextColor = CSS_Color.MainBackgroundColor,
+ IsBold = true,
+ Radius = (uint)Application.GetRealHeight(20),
+ TextSize = 16,
+ TextID = StringId.ExitLabModel,
+ BackgroundColor = CSS_Color.MainColor,
+ };
+ exitLabView.AddChidren(btnExitLab);
+ btnExitLab.MouseUpEventHandler = (sender, e) => {
+
+ new System.Threading.Thread(() =>
+ {
+ device.extSet.labModel = false;
+ var result = new HttpServerRequest().DeviceExtSet(device.deviceId, device.extSet);
+ Application.RunOnMainThread(() =>
+ {
+ if (result != null && result.Code == StateCode.SUCCESS)
+ {
+ exitLabView.Visible = false;
+ }
+ });
+ })
+ { IsBackground = true }.Start();
+ };
+ //鍥炲埌缃《鍒锋柊
+ base.SettionFinishEvent += () => {
+ exitLabView.Visible = device.extSet.labModel;
+ };
+
+
+
}
+
+
/// <summary>
/// 鍒濆鍖栫浜屼釜绱㈠紩椤电殑鍐呭
@@ -131,7 +244,7 @@
else if (temp.state == "uninhabited")//鏃犱汉
{
btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/UnderProtectionBgIcon.png";
- btnSuctionView.TextID = StringId.UnderProtection;
+ btnSuctionView.TextID = StringId.wuren;
btnSuctionView.IsSelected = false;
}
else//鏈変汉
@@ -149,26 +262,106 @@
{
if (temp.state == "true")
{
+ btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/SomeoneInBgIcon.png";
btnIcon.IsSelected = true;
- btnSuctionView.TextID = StringId.Someone;
+ btnIcon.IsSelected = false;
+ btnSuctionView.TextID = StringId.SomeoneIn;
btnSuctionView.IsSelected = true;
}
else
{
btnIcon.IsSelected = false;
- btnSuctionView.TextID = StringId.SensorNormalState;
+ btnSuctionView.TextID = StringId.wuren;
btnSuctionView.IsSelected = false;
}
//澧炲姞瀹為獙瀹ゆā寮忓弽棣�
var tempStatus = device.attributes.Find((sta) => sta.key == FunctionAttributeKey.TargetStatus);
if(tempStatus != null)
{
- if(tempStatus.state == "4")
- {
- btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/SomeoneFellBgIcon.png";
- btnSuctionView.TextID = StringId.SomeoneFell;
- btnSuctionView.IsSelected = true;
+
+ switch (tempStatus.state)
+ {//0绌猴紝1璧帮紝2璺戯紝3鍧愶紝4璺屽�掞紝5绔�
+ case "0":
+ btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/UnderProtectionBgIcon.png";
+ btnIcon.IsSelected = true;
+ btnIcon.IsSelected = false;
+ btnSuctionView.TextID = StringId.wuren;
+ btnSuctionView.IsSelected = false;
+ break;
+ case "1":
+ btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/SomeoneInBgIcon.png";
+ btnIcon.IsSelected = true;
+ btnIcon.IsSelected = false;
+ btnSuctionView.TextID = StringId.Someone;
+ btnSuctionView.IsSelected = true;
+ break;
+ case "2":
+ if (device.extSet.labModel)
+ {
+ btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/SomeoneRunBgIcon.png";
+ btnIcon.IsSelected = true;
+ btnIcon.IsSelected = false;
+ btnSuctionView.TextID = StringId.SomeoneRunning;
+ btnSuctionView.IsSelected = true;
+ }
+ else
+ {
+ btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/SomeoneInBgIcon.png";
+ btnIcon.IsSelected = true;
+ btnIcon.IsSelected = false;
+ btnSuctionView.TextID = StringId.Someone;
+ btnSuctionView.IsSelected = true;
+ }
+ break;
+ case "3":
+ if (device.extSet.labModel)
+ {
+ btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/SomeoneSitBgIcon.png";
+ btnIcon.IsSelected = true;
+ btnIcon.IsSelected = false;
+ btnSuctionView.TextID = StringId.SomeoneSitting;
+ btnSuctionView.IsSelected = true;
+ }
+ else
+ {
+ btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/SomeoneInBgIcon.png";
+ btnIcon.IsSelected = true;
+ btnIcon.IsSelected = false;
+ btnSuctionView.TextID = StringId.Someone;
+ btnSuctionView.IsSelected = true;
+ }
+ break;
+ case "4":
+ btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/SomeoneFellBgIcon.png";
+ btnIcon.IsSelected = true;
+ btnIcon.IsSelected = false;
+ btnSuctionView.TextID = StringId.SomeoneFell;
+ btnSuctionView.IsSelected = true;
+ break;
+ case "5":
+ if (device.extSet.labModel)
+ {
+ btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/SomeoneStandBgIcon.png";
+ btnIcon.IsSelected = true;
+ btnIcon.IsSelected = false;
+ btnSuctionView.TextID = StringId.SomeoneStanding;
+ btnSuctionView.IsSelected = true;
+ }
+ else
+ {
+ btnIcon.UnSelectedImagePath = "FunctionIcon/ArmSensor/SomeoneInBgIcon.png";
+ btnIcon.IsSelected = true;
+ btnIcon.IsSelected = false;
+ btnSuctionView.TextID = StringId.Someone;
+ btnSuctionView.IsSelected = true;
+ }
+ break;
+ default:
+
+ break;
}
+
+
}
}
}
--
Gitblit v1.8.0