From 23fb45dd846ed8b62304c408c6bbe64265d4ac8b Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期五, 20 十二月 2019 18:57:16 +0800
Subject: [PATCH] 代码合并
---
ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs | 27 ++++++++++++++++++++++++---
1 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs b/ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs
index 2748b44..b9dc2ad 100755
--- a/ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs
@@ -44,7 +44,7 @@
/// </summary>
public int OldIconPathType;
-
+
#endregion
public EditRoom()
@@ -207,6 +207,7 @@
return;
}
room.TemperatrueDevice = $"{selectTemp.DeviceAddr}{selectTemp.DeviceEpoint}";
+ temperatureRow.SetTitle(R.MyInternationalizationString.Getting);
HdlGatewayReceiveLogic.Current.RemoveEvent("TemperatrueDevice");
HdlGatewayReceiveLogic.Current.AddAttributeEvent("TemperatrueDevice", ReceiveComandDiv.A璁惧灞炴�т笂鎶�, ((report) =>
@@ -227,6 +228,7 @@
{
//0鈩�
temperatureRow.NameText.Text = "0.0鈩�";
+ room.Temperatrue = 0;
}
else if (data.AttriButeData > 32767)
{
@@ -235,6 +237,7 @@
//灏忔暟鐐归渶瑕佷竴浣�
strValue = strValue.Substring(0, strValue.Length - 1);
temperatureRow.NameText.Text = strValue.Insert(strValue.Length - 1, ".") + "鈩�";
+ room.Temperatrue = int.Parse(strValue) * 0.1;
}
else
{
@@ -242,6 +245,7 @@
string strValue = data.AttriButeData.ToString();
strValue = strValue.Substring(0, strValue.Length - 1);
temperatureRow.NameText.Text = strValue.Insert(strValue.Length - 1, ".") + "鈩�";
+ room.Temperatrue = int.Parse(strValue) *0.1;
}
}
}
@@ -252,6 +256,7 @@
};
if (string.IsNullOrEmpty(room.TemperatrueDevice) == false)
{
+ temperatureRow.SetTitle(R.MyInternationalizationString.Getting);
HdlGatewayReceiveLogic.Current.RemoveEvent("TemperatrueDevice");
HdlGatewayReceiveLogic.Current.AddAttributeEvent("TemperatrueDevice", ReceiveComandDiv.A璁惧灞炴�т笂鎶�, (Action<ZigBee.Device.CommonDevice>)((report) =>
{
@@ -271,6 +276,7 @@
{
//0鈩�
temperatureRow.NameText.Text = "0.0鈩�";
+ room.Temperatrue = 0;
}
else if (data.AttriButeData > 32767)
{
@@ -279,6 +285,7 @@
//灏忔暟鐐归渶瑕佷竴浣�
strValue = strValue.Substring(0, strValue.Length - 1);
temperatureRow.NameText.Text = strValue.Insert(strValue.Length - 1, ".") + "鈩�";
+ room.Temperatrue = int.Parse(strValue) * 0.1;
}
else
{
@@ -286,6 +293,7 @@
string strValue = data.AttriButeData.ToString();
strValue = strValue.Substring(0, strValue.Length - 1);
temperatureRow.NameText.Text = strValue.Insert(strValue.Length - 1, ".") + "鈩�";
+ room.Temperatrue = int.Parse(strValue) * 0.1;
}
}
}
@@ -296,6 +304,10 @@
{
(dev as ZigBee.Device.TemperatureSensor).ReadTemperatureOrHumidity();
}
+ }
+ else
+ {
+ temperatureRow.SetTitle(R.MyInternationalizationString.No);
}
@@ -318,6 +330,7 @@
return;
}
room.HumidityDevice = $"{selectTemp.DeviceAddr}{selectTemp.DeviceEpoint}";
+ humidityRow.SetTitle(R.MyInternationalizationString.Getting);
HdlGatewayReceiveLogic.Current.RemoveEvent("HumidityDevice");
HdlGatewayReceiveLogic.Current.AddAttributeEvent("HumidityDevice", ReceiveComandDiv.A璁惧灞炴�т笂鎶�, (report) =>
@@ -337,6 +350,7 @@
{
//0
humidityRow.NameText.Text = "0.0%";
+ room.Humidity = 0;
}
else
{
@@ -344,6 +358,7 @@
string strValue = data.AttriButeData.ToString();
strValue = strValue.Substring(0, strValue.Length - 1);
humidityRow.NameText.Text = strValue.Insert(strValue.Length - 1, ".") + "%";
+ room.Humidity = int.Parse(strValue) * 0.1;
}
}
}
@@ -354,6 +369,7 @@
};
if (string.IsNullOrEmpty(room.HumidityDevice) == false)
{
+ humidityRow.SetTitle(R.MyInternationalizationString.Getting);
HdlGatewayReceiveLogic.Current.RemoveEvent("HumidityDevice");
HdlGatewayReceiveLogic.Current.AddAttributeEvent("HumidityDevice", ReceiveComandDiv.A璁惧灞炴�т笂鎶�, (report) =>
{
@@ -372,6 +388,7 @@
{
//0
humidityRow.NameText.Text = "0.0%";
+ room.Humidity = 0;
}
else
{
@@ -379,6 +396,7 @@
string strValue = data.AttriButeData.ToString();
strValue = strValue.Substring(0, strValue.Length - 1);
humidityRow.NameText.Text = strValue.Insert(strValue.Length - 1, ".") + "%";
+ room.Humidity = int.Parse(strValue) * 0.1;
}
}
}
@@ -390,6 +408,10 @@
(dev as ZigBee.Device.TemperatureSensor).ReadTemperatureOrHumidity();
}
}
+ else
+ {
+ humidityRow.SetTitle(R.MyInternationalizationString.No);
+ }
if (Config.Instance.Home.FloorDics.Count == 0 || room.IsLove)
{
@@ -397,7 +419,7 @@
humidityRow.Y= Application.GetRealHeight(446);
}
- var confirm = new Device.CommonForm.CompleteButton(1700, 700, 127);
+ var confirm = new Device.CommonForm.CompleteButton(1700, 900, 127);
confirm.SetTitle(R.MyInternationalizationString.Confrim);
AddChidren(confirm);
confirm.MouseUpEventHandler += (sender, e) =>
@@ -423,7 +445,6 @@
action?.Invoke();
RemoveFromParent();
};
-
}
/// <summary>
--
Gitblit v1.8.0