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/SensorWaterImmersionPage.cs | 41 ++++++++++++++++++++++++++++++++++++++++-
1 files changed, 40 insertions(+), 1 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorWaterImmersionPage.cs b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorWaterImmersionPage.cs
index a4e92e1..0aef0ed 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorWaterImmersionPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorWaterImmersionPage.cs
@@ -47,12 +47,38 @@
})
{ IsBackground = true }.Start();
}
-
+ BatteryPersentControl batteryControl;
/// <summary>
/// 鍒濆鍖栫涓�涓储寮曢〉鐨勫唴瀹�
/// </summary>
private void InitFrameWhiteContent1()
{
+ //鐢垫睜鎺т欢
+ this.batteryControl = new BatteryPersentControl();
+ //瀹冩湁涓渶灏忕殑X杞�
+ batteryControl.X = Application.GetRealWidth(104) > base.btnRoomName.Right ? Application.GetRealWidth(104) : base.btnRoomName.Right + Application.GetRealWidth(4);
+ if (batteryControl.Height > base.btnRoomName.Height)
+ {
+ //涓�涓槸25锛屼竴涓槸21锛屽紕涓嶅噯鍒板簳璋佹洿楂�,鍥犱负璁$畻鏂规硶涓嶄竴鏍�
+ batteryControl.Y = base.btnRoomName.Y - (batteryControl.Height - base.btnRoomName.Height) / 2;
+ }
+ else
+ {
+ batteryControl.Y = base.btnRoomName.Y + (batteryControl.Height - base.btnRoomName.Height) / 2;
+ }
+ batteryControl.InitControl(false);
+ batteryControl.SetValue(80);
+ var powerLowTipAttr = device.attributes.Find((obj) => obj.key == FunctionAttributeKey.BatteryState);
+ if (powerLowTipAttr != null)
+ {
+ if(powerLowTipAttr.state.ToLower() == "low")
+ {
+ batteryControl.SetValue(20);
+ }
+ }
+ FrameWhiteCentet1.AddChidren(batteryControl);
+
+
btnIcon = new IconViewControl(198)
{
Gravity = Gravity.CenterHorizontal,
@@ -136,6 +162,19 @@
btnSuctionView.IsSelected = false;
}
}
+
+ var powerLowTipAttr = device.attributes.Find((obj) => obj.key == FunctionAttributeKey.BatteryState);
+ if (powerLowTipAttr != null)
+ {
+ if (powerLowTipAttr.state.ToLower() == "low")
+ {
+ batteryControl.SetValue(20);
+ }
+ else
+ {
+ batteryControl.SetValue(80);
+ }
+ }
});
}
--
Gitblit v1.8.0