From e7a71b8318fa26b8a85eac86e4c0a129f453d44f Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期三, 08 一月 2020 17:54:16 +0800
Subject: [PATCH] 2019.1.8
---
ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs | 62 +++++++++++++++---------------
1 files changed, 31 insertions(+), 31 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs b/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs
index 2f4638f..3accaa7 100644
--- a/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs
+++ b/ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs
@@ -1130,10 +1130,9 @@
functionView.SetStatuText(device.GetDeviceStatu());
functionView.SetDeviceName(device.CommonDevice.DeviceEpointName);
functionView.IsSelected = light.OnOffStatus == 1;
- functionView.SetCollect(Room.CurrentRoom.IsCollectInRoom(Room.CurrentRoom, device.FileName));
+ functionView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName));
- var dev = Room.LoveRoomDeviceUIFilePathList.Find((obj) => obj == device.FileName);
- if (dev == null)
+ if (Common.Room.CurrentRoom.IsCollectInRoom(device.FileName) == false)
{
functionView.CollectButton.IsSelected = false;
}
@@ -1250,7 +1249,7 @@
functionView.SetStatuText(device.GetDeviceStatu());
functionView.SetDeviceName(airSwitch.DeviceEpointName);
functionView.IsSelected = airSwitch.OnOffStatus == 1;
- functionView.SetCollect(Room.CurrentRoom.IsCollectInRoom(Room.CurrentRoom, device.FileName));
+ functionView.SetCollect(Room.CurrentRoom.IsCollectInRoom( device.FileName));
functionView.SwitchButton.MouseUpEventHandler += (sender, e) =>
{
@@ -1360,7 +1359,7 @@
functionView.SetStatuText(device.GetDeviceStatu());
functionView.SetDeviceName(device.CommonDevice.DeviceEpointName);
functionView.IsSelected = ac.currentSystemMode != 0;
- functionView.SetCollect(Room.CurrentRoom.IsCollectInRoom(Room.CurrentRoom, device.FileName));
+ functionView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName));
functionView.SwitchButton.MouseUpEventHandler += (sender, e) =>
{
@@ -1471,10 +1470,9 @@
functionView.SetStatuText(device.GetDeviceStatu());
functionView.SetDeviceName(device.CommonDevice.DeviceEpointName);
functionView.IsSelected = dimmableLight.OnOffStatus == 1;
- functionView.SetCollect(Room.CurrentRoom.IsCollectInRoom(Room.CurrentRoom, device.FileName));
+ functionView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName));
- var dev = Room.LoveRoomDeviceUIFilePathList.Find((obj) => obj == device.FileName);
- if (dev == null)
+ if (Common.Room.CurrentRoom.IsCollectInRoom(device.FileName) == false)
{
functionView.CollectButton.IsSelected = false;
}
@@ -1568,10 +1566,9 @@
lightView.SetStatuText(device.GetDeviceStatu());
lightView.SetDeviceName(device.CommonDevice.DeviceEpointName);
lightView.IsSelected = ias.iASInfo?.Alarm1 == 1;
- lightView.SetCollect(Room.CurrentRoom.IsCollectInRoom(Room.CurrentRoom, device.FileName));
+ lightView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName));
lightView.CanControl(false);
- var dev = Room.LoveRoomDeviceUIFilePathList.Find((obj) => obj == device.FileName);
- if (dev == null)
+ if (Common.Room.CurrentRoom.IsCollectInRoom(device.FileName) == false)
{
lightView.CollectButton.IsSelected = false;
}
@@ -1629,10 +1626,9 @@
lightView.SetStatuText(device.GetDeviceStatu());
lightView.SetDeviceName(device.CommonDevice.DeviceEpointName);
lightView.IsSelected = false;
- lightView.SetCollect(Room.CurrentRoom.IsCollectInRoom(Room.CurrentRoom, device.FileName));
+ lightView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName));
lightView.CanControl(false);
- var dev = Room.LoveRoomDeviceUIFilePathList.Find((obj) => obj == device.FileName);
- if (dev == null)
+ if (Common.Room.CurrentRoom.IsCollectInRoom(device.FileName) == false)
{
lightView.CollectButton.IsSelected = false;
}
@@ -1655,11 +1651,10 @@
lightView.SetDeviceImage(device.IconPath, device.OnlineIconPath);
lightView.SetStatuText(device.GetDeviceStatu());
lightView.SetDeviceName(device.CommonDevice.DeviceEpointName);
- lightView.IsSelected = dimmableLight.IsOnline == 1;
- lightView.SetCollect(Room.CurrentRoom.IsCollectInRoom(Room.CurrentRoom, device.FileName));
+ lightView.IsSelected = false;
+ lightView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName));
lightView.CanControl(false);
- var dev = Room.LoveRoomDeviceUIFilePathList.Find((obj) => obj == device.FileName);
- if (dev == null)
+ if (Common.Room.CurrentRoom.IsCollectInRoom(device.FileName) == false)
{
lightView.CollectButton.IsSelected = false;
}
@@ -1689,10 +1684,9 @@
lightView.SetDeviceName(device.CommonDevice.DeviceEpointName);
lightView.CanControl(false);
//lightView.IsSelected = device.CommonDevice.IsOnline == 1;
- lightView.SetCollect(Room.CurrentRoom.IsCollectInRoom(Room.CurrentRoom, device.FileName));
+ lightView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName));
- var dev = Room.LoveRoomDeviceUIFilePathList.Find((obj) => obj == device.FileName);
- if (dev == null)
+ if (Common.Room.CurrentRoom.IsCollectInRoom(device.FileName) == false)
{
lightView.CollectButton.IsSelected = false;
}
@@ -1722,23 +1716,29 @@
/// <param name="functionView"></param>
private void ReFreshEditDeviceAction(DeviceUI device, Common.Room curRoom, FunctionMainView functionView)
{
- if (curRoom.Id != Common.Room.CurrentRoom.Id)
+ if (Common.Room.CurrentRoom.IsLove)
{
- if (Common.Room.CurrentRoom.IsLove)
+ functionView.SetDeviceImage(device.IconPath, device.OnlineIconPath);
+ functionView.SetDeviceName(device.CommonDevice.DeviceEpointName);
+ if (Room.CurrentRoom.IsCollectInRoom(device.FileName) == false)
{
- functionView.SetDeviceImage(device.IconPath, device.OnlineIconPath);
- functionView.SetDeviceName(device.CommonDevice.DeviceEpointName);
- }
- else
- {
- Common.Room.CurrentRoom.DeleteDevice(device.FileName);
ShowFunction();
}
}
else
{
- functionView.SetDeviceImage(device.IconPath, device.OnlineIconPath);
- functionView.SetDeviceName(device.CommonDevice.DeviceEpointName);
+ if (curRoom.Id != Common.Room.CurrentRoom.Id)
+ {
+
+ Common.Room.CurrentRoom.DeleteDevice(device.FileName);
+ ShowFunction();
+ }
+ else
+ {
+ functionView.SetDeviceImage(device.IconPath, device.OnlineIconPath);
+ functionView.SetDeviceName(device.CommonDevice.DeviceEpointName);
+ functionView.SetCollect(Room.CurrentRoom.IsCollectInRoom(device.FileName));
+ }
}
}
--
Gitblit v1.8.0