From 0e4ad9a4de5b95f58daf1a6c5072c6a57cf223f9 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期一, 30 十二月 2019 10:02:10 +0800
Subject: [PATCH] 2019.12.30

---
 ZigbeeApp/Shared/Phone/Device/CommonForm/RoomView.cs |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/RoomView.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/RoomView.cs
index ebede4c..0d012e2 100644
--- a/ZigbeeApp/Shared/Phone/Device/CommonForm/RoomView.cs
+++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/RoomView.cs
@@ -24,8 +24,8 @@
 
         public override void RemoveFromParent()
         {
-            HdlGatewayReceiveLogic.Current.RemoveEvent("TemperatrueDevice");
-            HdlGatewayReceiveLogic.Current.RemoveEvent("HumidityDevice");
+            HdlGatewayReceiveLogic.Current.RemoveEvent("TemperatrueDevice" + room.Id);
+            HdlGatewayReceiveLogic.Current.RemoveEvent("HumidityDevice" + room.Id);
             base.RemoveFromParent();
         }
 
@@ -139,8 +139,8 @@
 
             if (string.IsNullOrEmpty(room.TemperatrueDevice) == false)
             {
-                HdlGatewayReceiveLogic.Current.RemoveEvent("TemperatrueDevice");
-                HdlGatewayReceiveLogic.Current.AddAttributeEvent("TemperatrueDevice", ReceiveComandDiv.A璁惧灞炴�т笂鎶�, (Action<ZigBee.Device.CommonDevice>)((report) =>
+                HdlGatewayReceiveLogic.Current.RemoveEvent("TemperatrueDevice" + room.Id);
+                HdlGatewayReceiveLogic.Current.AddAttributeEvent("TemperatrueDevice" + room.Id, ReceiveComandDiv.A璁惧灞炴�т笂鎶�, (report) =>
                 {
                     string mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(report);
                     if (room.TemperatrueDevice != mainKeys)
@@ -179,7 +179,7 @@
                             }
                         }
                     }
-                }));
+                });
                 //鍙戦�佽幏鍙栨俯搴︾殑鍛戒护
                 var dev = Common.LocalDevice.Current.GetDevice(room.TemperatrueDevice);
                 if (dev != null)
@@ -190,8 +190,8 @@
 
             if (string.IsNullOrEmpty(room.HumidityDevice) == false)
             {
-                HdlGatewayReceiveLogic.Current.RemoveEvent("HumidityDevice");
-                HdlGatewayReceiveLogic.Current.AddAttributeEvent("HumidityDevice",  ReceiveComandDiv.A璁惧灞炴�т笂鎶�, (report) =>
+                HdlGatewayReceiveLogic.Current.RemoveEvent("HumidityDevice"+room.Id);
+                HdlGatewayReceiveLogic.Current.AddAttributeEvent("HumidityDevice" + room.Id,  ReceiveComandDiv.A璁惧灞炴�т笂鎶�, (report) =>
                 {
                     string mainKeys = Common.LocalDevice.Current.GetDeviceMainKeys(report);
                     if (room.HumidityDevice != mainKeys)

--
Gitblit v1.8.0