| | |
| | | }; |
| | | deviceRow.ClickBtn.MouseUpEventHandler += (send2, e2) => |
| | | { |
| | | if (deviceUI.CommonDevice.DfunctionType == DeviceFunctionType.A开关) |
| | | var lightControl = new Phone.Device.Light.OnOffControl(); |
| | | UserView.HomePage.Instance.AddChidren(lightControl); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | lightControl.Show(deviceUI, Common.Room.CurrentRoom); |
| | | lightControl.action += (curDev, curRoom) => |
| | | { |
| | | var lightControl = new Phone.Device.Light.OnOffControl(); |
| | | UserView.HomePage.Instance.AddChidren(lightControl); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | lightControl.Show(deviceUI, Common.Room.CurrentRoom); |
| | | lightControl.action += (curDev, curRoom) => |
| | | { |
| | | ReFreshDeviceAction(deviceUI, curRoom, sameTypeList, deviceListScrolView, deviceRow); |
| | | }; |
| | | } |
| | | else if (deviceUI.CommonDevice.DfunctionType == DeviceFunctionType.A插座) |
| | | { |
| | | var lightControl = new Phone.Device.Light.PlugControl(); |
| | | UserView.HomePage.Instance.AddChidren(lightControl); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | lightControl.Show(deviceUI, Common.Room.CurrentRoom); |
| | | lightControl.action += (curDev, curRoom) => |
| | | { |
| | | ReFreshDeviceAction(deviceUI, curRoom, sameTypeList, deviceListScrolView, deviceRow); |
| | | }; |
| | | } |
| | | else |
| | | { |
| | | var lightControl = new Phone.Device.Light.LightControl(); |
| | | UserView.HomePage.Instance.AddChidren(lightControl); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | lightControl.Show(deviceUI, Common.Room.CurrentRoom); |
| | | lightControl.action += (curDev, curRoom) => |
| | | { |
| | | ReFreshDeviceAction(deviceUI, curRoom, sameTypeList, deviceListScrolView, deviceRow); |
| | | }; |
| | | } |
| | | ReFreshDeviceAction(deviceUI, curRoom, sameTypeList, deviceListScrolView, deviceRow); |
| | | }; |
| | | }; |
| | | |
| | | EventHandler<MouseEventArgs> deviceDetailHandler = (send2, e2) => |