| | |
| | | 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; |
| | | } |
| | |
| | | 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) => |
| | | { |
| | |
| | | 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) => |
| | | { |
| | |
| | | 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; |
| | | } |
| | |
| | | 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; |
| | | } |
| | |
| | | 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; |
| | | } |
| | |
| | | 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; |
| | | } |
| | |
| | | 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; |
| | | } |
| | |
| | | /// <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)); |
| | | } |
| | | } |
| | | } |
| | | |