| | |
| | | /// <summary> |
| | | /// 当前选中房间 |
| | | /// </summary> |
| | | private Common.Room room; |
| | | private Common.Room curRoom; |
| | | #endregion |
| | | |
| | | #region ◆ 接口____________________________ |
| | |
| | | { |
| | | devList = room.DeviceUIList; |
| | | sceneList = room.SceneUIList; |
| | | var sameDevList = new List<DeviceUI> { }; |
| | | typeDeviceDic.Clear(); |
| | | typeIdDic.Clear(); |
| | | foreach (var device in devList) |
| | | { |
| | | var info = Common.LocalDevice.Current.GetNotHdlMyDeviceEnumInfo(new List<CommonDevice> { device.CommonDevice }); |
| | | if(info.BeloneType== DeviceBeloneType.A干接点 || info.BeloneType==DeviceBeloneType.A中继器) |
| | | if (info.BeloneType == DeviceBeloneType.A干接点 || info.BeloneType == DeviceBeloneType.A中继器) |
| | | { |
| | | continue; |
| | | } |
| | | sameDevList.Add(device); |
| | | typeDeviceDic[info.BeloneTextId] = sameDevList; |
| | | if (typeDeviceDic.ContainsKey(info.BeloneTextId) == false) |
| | | { |
| | | var sameDevList = new List<DeviceUI> { }; |
| | | sameDevList.Add(device); |
| | | typeDeviceDic[info.BeloneTextId] = sameDevList; |
| | | } |
| | | else |
| | | { |
| | | typeDeviceDic[info.BeloneTextId].Add(device); |
| | | } |
| | | typeIdDic[info.BeloneTextId] = info.ConcreteType; |
| | | } |
| | | } |
| | |
| | | UserView.HomePage.Instance.AddChidren(lightControl); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | //lightControl.action = RefreshBodyView; |
| | | lightControl.Show(deviceUI, room); |
| | | lightControl.Show(deviceUI, curRoom); |
| | | } |
| | | else if (deviceUI.CommonDevice.DfunctionType == DeviceFunctionType.A插座) |
| | | { |
| | |
| | | UserView.HomePage.Instance.AddChidren(lightControl); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | //lightControl.action = RefreshBodyView; |
| | | lightControl.Show(deviceUI, room); |
| | | lightControl.Show(deviceUI, curRoom); |
| | | } |
| | | else |
| | | { |
| | |
| | | UserView.HomePage.Instance.AddChidren(lightControl); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | //lightControl.action = RefreshBodyView; |
| | | lightControl.Show(deviceUI, room); |
| | | lightControl.Show(deviceUI, curRoom); |
| | | } |
| | | }; |
| | | |
| | |
| | | Tag = deviceUI, |
| | | Radius = 0 |
| | | }; |
| | | if (room.IsSharedRoom == false) |
| | | if (curRoom.IsSharedRoom == false) |
| | | { |
| | | deviceTypeRowLayout.AddRightView(editBtn); |
| | | editBtn.MouseUpEventHandler += deviceDetailHandler; |
| | |
| | | UserView.HomePage.Instance.AddChidren(lightControl); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | //lightControl.action = RefreshBodyView; |
| | | lightControl.Show(deviceUI, room); |
| | | lightControl.Show(deviceUI, curRoom); |
| | | }; |
| | | |
| | | var editBtn = new CommonForm.RowLayoutEditButton() |
| | |
| | | Tag = deviceUI, |
| | | Radius = 0 |
| | | }; |
| | | if (room.IsSharedRoom == false) |
| | | if (curRoom.IsSharedRoom == false) |
| | | { |
| | | deviceTypeRowLayout.AddRightView(editBtn); |
| | | editBtn.MouseUpEventHandler += deviceDetailHandler; |
| | |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | UserView.HomePage.Instance.ScrollEnabled = false; |
| | | //dimmableLightControl.action = RefreshBodyView; |
| | | dimmableLightControl.Show(deviceUI, room); |
| | | dimmableLightControl.Show(deviceUI, curRoom); |
| | | }; |
| | | |
| | | var editBtn = new CommonForm.RowLayoutEditButton() |
| | |
| | | Tag = deviceUI, |
| | | Radius = 0 |
| | | }; |
| | | if (room.IsSharedRoom == false) |
| | | if (curRoom.IsSharedRoom == false) |
| | | { |
| | | deviceTypeRowLayout.AddRightView(editBtn); |
| | | editBtn.MouseUpEventHandler += deviceDetailHandler; |
| | |
| | | Tag = deviceUI, |
| | | Radius = 0 |
| | | }; |
| | | if (room.IsSharedRoom == false) |
| | | if (curRoom.IsSharedRoom == false) |
| | | { |
| | | deviceTypeRowLayout.AddRightView(editBtn); |
| | | editBtn.MouseUpEventHandler += deviceDetailHandler; |
| | |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | UserView.HomePage.Instance.ScrollEnabled = false; |
| | | //rollerShadeControl.action = RefreshBodyView; |
| | | acControl.Show(deviceUI, room); |
| | | acControl.Show(deviceUI, curRoom); |
| | | }; |
| | | } |
| | | } |
| | |
| | | Tag = deviceUI, |
| | | Radius = 0 |
| | | }; |
| | | if (room.IsSharedRoom == false) |
| | | if (curRoom.IsSharedRoom == false) |
| | | { |
| | | deviceTypeRowLayout.AddRightView(editBtn); |
| | | editBtn.MouseUpEventHandler += deviceDetailHandler; |
| | |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | UserView.HomePage.Instance.ScrollEnabled = false; |
| | | //rollerShadeControl.action = RefreshBodyView; |
| | | rollerShadeControl.Show(deviceUI, room); |
| | | rollerShadeControl.Show(deviceUI, curRoom); |
| | | }; |
| | | } |
| | | } |
| | |
| | | |
| | | deviceRow.ClickBtn.MouseUpEventHandler += (send2, e2) => |
| | | { |
| | | var userDoorLockPage = new UserDoorLockPage(room, deviceUI); |
| | | var userDoorLockPage = new UserDoorLockPage(curRoom, deviceUI); |
| | | HomePage.Instance.AddChidren(userDoorLockPage); |
| | | HomePage.Instance.PageIndex += 1; |
| | | userDoorLockPage.Show(); |
| | |
| | | { |
| | | Tag = deviceUI |
| | | }; |
| | | if (room.IsSharedRoom == false) |
| | | if (curRoom.IsSharedRoom == false) |
| | | { |
| | | deviceTypeRowLayout.AddRightView(editBtn); |
| | | editBtn.MouseUpEventHandler += deviceDetailHandler; |
| | |
| | | { |
| | | Tag = deviceUI |
| | | }; |
| | | if (room.IsSharedRoom == false) |
| | | if (curRoom.IsSharedRoom == false) |
| | | { |
| | | deviceTypeRowLayout.AddRightView(editBtn); |
| | | editBtn.MouseUpEventHandler += deviceDetailHandler; |
| | |
| | | if (room.IsLove) |
| | | { |
| | | roomBtn.IsSelected = true; |
| | | this.room = room; |
| | | this.curRoom = room; |
| | | curBtn = roomBtn; |
| | | |
| | | if(sceneBtn.IsSelected) |
| | |
| | | (sender as Button).IsSelected = true; |
| | | curBtn.IsSelected = false; |
| | | curBtn = sender as Button; |
| | | this.room = room; |
| | | this.curRoom = room; |
| | | if (sceneBtn.IsSelected) |
| | | { |
| | | RefreshScene(room); |