From 25429f085093d89d543a0b90e30d0d62d1b7dac9 Mon Sep 17 00:00:00 2001
From: hxb <hxb@hdlchina.com.cn>
Date: 星期二, 30 八月 2022 09:37:38 +0800
Subject: [PATCH] 合并了IOS的代码
---
ZigbeeApp/Shared/Phone/Device/Logic/Method.cs | 37 +++++++++++++++++++++++++------------
1 files changed, 25 insertions(+), 12 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs
index 34bcb47..a4606e0 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs
@@ -21,7 +21,7 @@
/// <param name="device">Device.</param>
public static void RoomNmae(Button button, CommonDevice device)
{
- button.Text = HdlRoomLogic.Current.GetRoomNameByDevice(device);
+ button.Text = UserCenter.HdlRoomLogic.Current.GetRoomNameByDevice(device);
}
/// <summary>
/// 杩斿洖妤煎眰鎵�鏈夌殑鎴块棿鐨勫垪琛�
@@ -32,7 +32,7 @@
public static List<Common.Room> GetRoomList(string type, string floorId = null)
{
var list = new List<Common.Room>();
- var listAllRoom = HdlRoomLogic.Current.GetAllListRooms();
+ var listAllRoom = UserCenter.HdlRoomLogic.Current.GetAllListRooms();
for (int i = 0; i < listAllRoom.Count; i++)
{
if (type == "action_logicscene" || type == "action_lockscene")
@@ -75,7 +75,7 @@
var deviceUIlist = new List<CommonDevice>();
foreach (var deviceKey in room.ListDevice)
{
- var device = HdlDeviceCommonLogic.Current.GetDevice(deviceKey);
+ var device = LocalDevice.Current.GetDevice(deviceKey);
if (device == null)
{
continue;
@@ -87,7 +87,7 @@
}
if (device.Type == DeviceType.DoorLock)
{
- var myInfo = HdlDeviceCommonLogic.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
+ var myInfo = LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
if (myInfo.ConcreteType == DeviceConcreteType.IntelligentLocks_Sone)
{
//鏆傛椂涓嶆敮鎸丼-one闂ㄩ攣;
@@ -293,16 +293,29 @@
break;
case DeviceType.TemperatureSensor:
{
- var temperatureSensor = device as TemperatureSensor;
- if (temperatureSensor.SensorDiv == 1)
+
+
+ //鑾峰彇璁惧绫诲瀷
+ var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
+ //绌烘皵璐ㄩ噺浼犳劅鍣�
+ if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.AirQualitySensor)
{
- patm = $"ZigeeLogic/temperature.png";
- selectedpatm = $"ZigeeLogic/selectedtemperature.png";
+ patm = $"ZigeeLogic/airquality.png";
+ selectedpatm = $"ZigeeLogic/airqualityselected.png";
}
else
{
- patm = "ZigeeLogic/humidity.png";
- selectedpatm = "ZigeeLogic/selectedhumidity.png";
+ var temperatureSensor = device as TemperatureSensor;
+ if (temperatureSensor.SensorDiv == 1)
+ {
+ patm = $"ZigeeLogic/temperature.png";
+ selectedpatm = $"ZigeeLogic/selectedtemperature.png";
+ }
+ else
+ {
+ patm = "ZigeeLogic/humidity.png";
+ selectedpatm = "ZigeeLogic/selectedhumidity.png";
+ }
}
}
break;
@@ -764,7 +777,7 @@
if (CurrentLogic.Conditions.Count == 0 || CurrentLogic.Actions.Count == 0)
{
- var alert = new ShowMsgControl(ShowMsgType.Normal,
+ var alert = new UserCenter.ShowMsgControl(ShowMsgType.Normal,
Language.StringByID(MyInternationalizationString.addnull),
Language.StringByID(MyInternationalizationString.confrim));
alert.Show();
@@ -773,7 +786,7 @@
if (string.IsNullOrEmpty(name))
{
- var alert = new ShowMsgControl(ShowMsgType.Normal,
+ var alert = new UserCenter.ShowMsgControl(ShowMsgType.Normal,
Language.StringByID(MyInternationalizationString.PleaseEnterLogicName),
Language.StringByID(MyInternationalizationString.confrim));
alert.Show();
--
Gitblit v1.8.0