From 3dcbd186c42c598c0c08d1cd37034cf2baa09e54 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 30 十二月 2019 15:47:51 +0800
Subject: [PATCH] 合并了代码

---
 ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs |   68 ++++++++++++++++++---------------
 1 files changed, 37 insertions(+), 31 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs
index fe32bb6..0efff34 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Residence/EditorRoomInforForm.cs
@@ -312,7 +312,7 @@
             btnTemper.Text = Language.StringByID(R.MyInternationalizationString.uGetting);
 
             HdlGatewayReceiveLogic.Current.RemoveEvent("TemperatrueDevice");
-            HdlGatewayReceiveLogic.Current.AddAttributeEvent("TemperatrueDevice", ReceiveComandDiv.A璁惧灞炴�т笂鎶�, (Action<ZigBee.Device.CommonDevice>)((report) =>
+            HdlGatewayReceiveLogic.Current.AddAttributeEvent("TemperatrueDevice", ReceiveComandDiv.A璁惧灞炴�т笂鎶�, ((report) =>
             {
                 string mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(report);
                 if (cloneRoom.TemperatrueDevice != mainKeys || btnTemper == null)
@@ -326,26 +326,29 @@
                 {
                     if (data.AttributeId == (int)ZigBee.Device.AttriButeId.MeasuredValue)
                     {
-                        if (data.AttriButeData == 0)
+                        HdlThreadLogic.Current.RunMain(() =>
                         {
-                            //0鈩�
-                            btnTemper.Text = "0.0鈩�";
-                        }
-                        else if (data.AttriButeData > 32767)
-                        {
-                            //璐熸暟(鐗规畩澶勭悊)
-                            string strValue = (data.AttriButeData - 65536).ToString();
-                            //灏忔暟鐐归渶瑕佷竴浣�
-                            strValue = strValue.Substring(0, strValue.Length - 1);
-                            btnTemper.Text = strValue.Insert(strValue.Length - 1, ".") + "鈩�";
-                        }
-                        else
-                        {
-                            //灏忔暟鐐归渶瑕佷竴浣�
-                            string strValue = data.AttriButeData.ToString();
-                            strValue = strValue.Substring(0, strValue.Length - 1);
-                            btnTemper.Text = strValue.Insert(strValue.Length - 1, ".") + "鈩�";
-                        }
+                            if (data.AttriButeData == 0)
+                            {
+                                //0鈩�
+                                btnTemper.Text = "0.0鈩�";
+                            }
+                            else if (data.AttriButeData > 32767)
+                            {
+                                //璐熸暟(鐗规畩澶勭悊)
+                                string strValue = (data.AttriButeData - 65536).ToString();
+                                //灏忔暟鐐归渶瑕佷竴浣�
+                                strValue = strValue.Substring(0, strValue.Length - 1);
+                                btnTemper.Text = strValue.Insert(strValue.Length - 1, ".") + "鈩�";
+                            }
+                            else
+                            {
+                                //灏忔暟鐐归渶瑕佷竴浣�
+                                string strValue = data.AttriButeData.ToString();
+                                strValue = strValue.Substring(0, strValue.Length - 1);
+                                btnTemper.Text = strValue.Insert(strValue.Length - 1, ".") + "鈩�";
+                            }
+                        });
                     }
                 }
             }));
@@ -418,18 +421,21 @@
                 {
                     if (data.AttributeId == (int)ZigBee.Device.AttriButeId.MeasuredValue)
                     {
-                        if (data.AttriButeData == 0)
+                        HdlThreadLogic.Current.RunMain(() =>
                         {
-                            //0
-                            btnHumi.Text = "0.0%";
-                        }
-                        else
-                        {
-                            //灏忔暟鐐归渶瑕佷竴浣�(婀垮害娌℃湁璐熸暟)
-                            string strValue = data.AttriButeData.ToString();
-                            strValue = strValue.Substring(0, strValue.Length - 1);
-                            btnHumi.Text = strValue.Insert(strValue.Length - 1, ".") + "%";
-                        }
+                            if (data.AttriButeData == 0)
+                            {
+                                //0
+                                btnHumi.Text = "0.0%";
+                            }
+                            else
+                            {
+                                //灏忔暟鐐归渶瑕佷竴浣�(婀垮害娌℃湁璐熸暟)
+                                string strValue = data.AttriButeData.ToString();
+                                strValue = strValue.Substring(0, strValue.Length - 1);
+                                btnHumi.Text = strValue.Insert(strValue.Length - 1, ".") + "%";
+                            }
+                        });
                     }
                 }
             });

--
Gitblit v1.8.0