| | |
| | | /// </summary> |
| | | /// <param name="room"></param> |
| | | /// <param name="doorLock"></param> |
| | | public UserDoorLockPage(Shared.Common.Room room, DeviceUI doorLock) |
| | | public UserDoorLockPage(Shared.Common.Room room, CommonDevice doorLock) |
| | | { |
| | | this.doorLock = doorLock.CommonDevice as ZigBee.Device.DoorLock; |
| | | this.doorLock = doorLock as ZigBee.Device.DoorLock; |
| | | currentRoom = room; |
| | | deviceUI = doorLock; |
| | | BackgroundColor = Shared.Common.ZigbeeColor.Current.GXCTopViewBackgroundColor; |
| | |
| | | /// <summary> |
| | | /// 设备UI对象 |
| | | /// </summary> |
| | | DeviceUI deviceUI; |
| | | CommonDevice deviceUI; |
| | | /// <summary> |
| | | /// 设置二次验证Action |
| | | /// </summary> |
| | |
| | | { |
| | | btnDoorLockTitle.Text = deviceRename; |
| | | //改房间 |
| | | Shared.Common.Room.CurrentRoom.ChangedRoom(deviceUI.CommonDevice, currentRoom.Id); |
| | | deviceUI.CommonDevice.ReSave(); |
| | | HdlRoomLogic.Current.ChangedRoom(deviceUI, currentRoom.Id); |
| | | deviceUI.ReSave(); |
| | | } |
| | | }; |
| | | }; |
| | |
| | | SelectedImagePath = "Item/CollectionSelected.png" |
| | | }; |
| | | btnCollectFrameLayout.AddChidren(btnCollect);
|
| | | var de = Shared.Common.Room.LoveRoomDeviceUIFilePathList.Find((obj) => obj == deviceUI.FileName);
|
| | | if (de == null)
|
| | | if (HdlRoomLogic.Current.IsCollectInRoom(deviceUI) == false)
|
| | | {
|
| | | btnCollect.IsSelected = false;
|
| | | }
|
| | |
| | | btnCollect.IsSelected = !btnCollect.IsSelected; |
| | | if (btnCollect.IsSelected) |
| | | { |
| | | Shared.Common.Room.CurrentRoom.GetLoveRoom().AddDevice(deviceUI.FileName);//收藏 |
| | | HdlRoomLogic.Current.AddLoveDevice(deviceUI);//收藏 |
| | | } |
| | | else |
| | | {
|
| | | Shared.Common.Room.CurrentRoom.GetLoveRoom().DeleteDevice(deviceUI.FileName); //取消收藏 |
| | | HdlRoomLogic.Current.DeleteLoveDevice(deviceUI);//取消收藏 |
| | | } |
| | | }; |
| | | btnCollectFrameLayout.MouseDownEventHandler += handerCollect; |
| | |
| | | { |
| | | btnDoorLockTitle.Text = deviceRename; |
| | | //改房间 |
| | | Shared.Common.Room.CurrentRoom.ChangedRoom(deviceUI.CommonDevice, currentRoom.Id); |
| | | deviceUI.CommonDevice.ReSave(); |
| | | HdlRoomLogic.Current.ChangedRoom(deviceUI, currentRoom.Id); |
| | | deviceUI.ReSave(); |
| | | } |
| | | }; |
| | | openFrameLayout.Enable = true; |
| | |
| | | { |
| | | if (!string.IsNullOrEmpty(deviceRename)) |
| | | { |
| | | btnDoorLockTitle.Text = deviceRename; |
| | | //改房间 |
| | | Shared.Common.Room.CurrentRoom.ChangedRoom(deviceUI.CommonDevice, currentRoom.Id); |
| | | deviceUI.CommonDevice.ReSave(); |
| | | btnDoorLockTitle.Text = deviceRename;
|
| | | //改房间
|
| | | HdlRoomLogic.Current.ChangedRoom(deviceUI, currentRoom.Id); |
| | | deviceUI.ReSave(); |
| | | } |
| | | }; |
| | | openFrameLayout.Enable = true; |