| | |
| | | /// sceneList |
| | | /// </summary> |
| | | private List<SceneUI> sceneList; |
| | | /// <summary> |
| | | /// 当前选中房间 |
| | | /// </summary> |
| | | private Common.Room curRoom; |
| | | #endregion |
| | | |
| | | #region ◆ 接口____________________________ |
| | |
| | | floors.FloorAction += (floorId) => |
| | | { |
| | | floorBtn.Text = Config.Instance.Home.GetFloorNameById(floorId); |
| | | Common.Room.CurrentRoom = Common.Room.CurrentRoom.GetLoveRoom(); |
| | | RefreshBodyView(); |
| | | }; |
| | | } |
| | |
| | | { |
| | | if (e2) |
| | | { |
| | | if(curRoom.IsLove) |
| | | if(Common.Room.CurrentRoom.IsLove) |
| | | { |
| | | Shared.Common.Room.CurrentRoom.DeleteDevice(deviceUI.FileName); |
| | | deviceListScrolView.RemoveViewByTag((delSender as Button).Tag); |
| | |
| | | UserView.HomePage.Instance.AddChidren(lightControl); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | //lightControl.action = RefreshBodyView; |
| | | lightControl.Show(deviceUI, curRoom); |
| | | lightControl.Show(deviceUI, Common.Room.CurrentRoom); |
| | | } |
| | | else if (deviceUI.CommonDevice.DfunctionType == DeviceFunctionType.A插座) |
| | | { |
| | |
| | | UserView.HomePage.Instance.AddChidren(lightControl); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | //lightControl.action = RefreshBodyView; |
| | | lightControl.Show(deviceUI, curRoom); |
| | | lightControl.Show(deviceUI, Common.Room.CurrentRoom); |
| | | } |
| | | else |
| | | { |
| | |
| | | UserView.HomePage.Instance.AddChidren(lightControl); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | //lightControl.action = RefreshBodyView; |
| | | lightControl.Show(deviceUI, curRoom); |
| | | lightControl.Show(deviceUI, Common.Room.CurrentRoom); |
| | | } |
| | | }; |
| | | |
| | |
| | | Tag = deviceUI, |
| | | Radius = 0 |
| | | }; |
| | | if (curRoom.IsSharedRoom == false) |
| | | if (Common.Room.CurrentRoom.IsSharedRoom == false) |
| | | { |
| | | deviceTypeRowLayout.AddRightView(editBtn); |
| | | editBtn.MouseUpEventHandler += deviceDetailHandler; |
| | |
| | | UserView.HomePage.Instance.AddChidren(lightControl); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | //lightControl.action = RefreshBodyView; |
| | | lightControl.Show(deviceUI, curRoom); |
| | | lightControl.Show(deviceUI, Common.Room.CurrentRoom); |
| | | }; |
| | | |
| | | var editBtn = new CommonForm.RowLayoutEditButton() |
| | |
| | | Tag = deviceUI, |
| | | Radius = 0 |
| | | }; |
| | | if (curRoom.IsSharedRoom == false) |
| | | if (Common.Room.CurrentRoom.IsSharedRoom == false) |
| | | { |
| | | deviceTypeRowLayout.AddRightView(editBtn); |
| | | editBtn.MouseUpEventHandler += deviceDetailHandler; |
| | |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | UserView.HomePage.Instance.ScrollEnabled = false; |
| | | //dimmableLightControl.action = RefreshBodyView; |
| | | dimmableLightControl.Show(deviceUI, curRoom); |
| | | dimmableLightControl.Show(deviceUI, Common.Room.CurrentRoom); |
| | | }; |
| | | |
| | | var editBtn = new CommonForm.RowLayoutEditButton() |
| | |
| | | Tag = deviceUI, |
| | | Radius = 0 |
| | | }; |
| | | if (curRoom.IsSharedRoom == false) |
| | | if (Common.Room.CurrentRoom.IsSharedRoom == false) |
| | | { |
| | | deviceTypeRowLayout.AddRightView(editBtn); |
| | | editBtn.MouseUpEventHandler += deviceDetailHandler; |
| | |
| | | Tag = deviceUI, |
| | | Radius = 0 |
| | | }; |
| | | if (curRoom.IsSharedRoom == false) |
| | | if (Common.Room.CurrentRoom.IsSharedRoom == false) |
| | | { |
| | | deviceTypeRowLayout.AddRightView(editBtn); |
| | | editBtn.MouseUpEventHandler += deviceDetailHandler; |
| | |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | UserView.HomePage.Instance.ScrollEnabled = false; |
| | | //rollerShadeControl.action = RefreshBodyView; |
| | | acControl.Show(deviceUI, curRoom); |
| | | acControl.Show(deviceUI, Common.Room.CurrentRoom); |
| | | }; |
| | | } |
| | | } |
| | |
| | | var editBtn = new CommonForm.RowLayoutEditButton() |
| | | { |
| | | Tag = deviceUI, |
| | | Radius = 0 |
| | | }; |
| | | var delBtn = new Device.CommonForm.RowLayoutDeleteButton() |
| | | { |
| | | Tag = deviceUI, |
| | | Radius = 0 |
| | | }; |
| | | if (curRoom.IsSharedRoom == false) |
| | | if (Common.Room.CurrentRoom.IsSharedRoom == false) |
| | | { |
| | | deviceTypeRowLayout.AddRightView(editBtn); |
| | | editBtn.MouseUpEventHandler += deviceDetailHandler; |
| | |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | UserView.HomePage.Instance.ScrollEnabled = false; |
| | | //rollerShadeControl.action = RefreshBodyView; |
| | | rollerShadeControl.Show(deviceUI, curRoom); |
| | | rollerShadeControl.Show(deviceUI, Common.Room.CurrentRoom); |
| | | }; |
| | | } |
| | | } |
| | |
| | | |
| | | deviceRow.ClickBtn.MouseUpEventHandler += (send2, e2) => |
| | | { |
| | | var userDoorLockPage = new UserDoorLockPage(curRoom, deviceUI); |
| | | var userDoorLockPage = new UserDoorLockPage(Common.Room.CurrentRoom, deviceUI); |
| | | HomePage.Instance.AddChidren(userDoorLockPage); |
| | | HomePage.Instance.PageIndex += 1; |
| | | userDoorLockPage.Show(); |
| | |
| | | { |
| | | Tag = deviceUI |
| | | }; |
| | | if (curRoom.IsSharedRoom == false) |
| | | if (Common.Room.CurrentRoom.IsSharedRoom == false) |
| | | { |
| | | deviceTypeRowLayout.AddRightView(editBtn); |
| | | editBtn.MouseUpEventHandler += deviceDetailHandler; |
| | |
| | | { |
| | | Tag = deviceUI |
| | | }; |
| | | if (curRoom.IsSharedRoom == false) |
| | | if (Common.Room.CurrentRoom.IsSharedRoom == false) |
| | | { |
| | | deviceTypeRowLayout.AddRightView(editBtn); |
| | | editBtn.MouseUpEventHandler += deviceDetailHandler; |
| | |
| | | { |
| | | Tag = deviceUI |
| | | }; |
| | | if (curRoom.IsSharedRoom == false) |
| | | if (Common.Room.CurrentRoom.IsSharedRoom == false) |
| | | { |
| | | deviceTypeRowLayout.AddRightView(editBtn); |
| | | editBtn.MouseUpEventHandler += deviceDetailHandler; |
| | |
| | | { |
| | | Tag = deviceUI |
| | | }; |
| | | if (curRoom.IsSharedRoom == false) |
| | | if (Common.Room.CurrentRoom.IsSharedRoom == false) |
| | | { |
| | | deviceTypeRowLayout.AddRightView(editBtn); |
| | | editBtn.MouseUpEventHandler += deviceDetailHandler; |
| | |
| | | roomBtn.SetTitle(room.Name); |
| | | row.AddChidren(roomBtn); |
| | | |
| | | if (room.IsLove) |
| | | if (room.Id == Common.Room.CurrentRoom.Id) |
| | | { |
| | | roomBtn.IsSelected = true; |
| | | this.curRoom = room; |
| | | curBtn = roomBtn; |
| | | if(sceneBtn.IsSelected) |
| | | { |
| | |
| | | RefreshFunction(room); |
| | | } |
| | | } |
| | | |
| | | roomBtn.ButtonClickEvent += (sender, e) => |
| | | { |
| | | if (sender == curBtn) |
| | |
| | | sender.IsSelected = true; |
| | | curBtn.IsSelected = false; |
| | | curBtn = sender; |
| | | this.curRoom = room; |
| | | Common.Room.CurrentRoom = room; |
| | | if (sceneBtn.IsSelected) |
| | | { |
| | | RefreshScene(room); |