gxc
2020-01-08 580a4715eeb88e13128e65963834b159768444cf
ZigbeeApp/Shared/Phone/UserView/UserHomeView.cs
@@ -1202,39 +1202,15 @@
                                        functionView.CardBG.MouseUpEventHandler += (sender, e) =>
                                        {
                                            CommonPage.Instance.IsDrawerLockMode = true;
                                            if (device.CommonDevice.DfunctionType == DeviceFunctionType.A开关)
                                            var lightControl = new Phone.Device.Light.OnOffControl();
                                            UserView.HomePage.Instance.AddChidren(lightControl);
                                            UserView.HomePage.Instance.PageIndex += 1;
                                            lightControl.Show(device, 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(device, Room.CurrentRoom);
                                                lightControl.action += (curDev, curRoom) =>
                                                {
                                                    ReFreshEditDeviceAction(device, curRoom, functionView);
                                                };
                                            }
                                            else if (device.CommonDevice.DfunctionType == DeviceFunctionType.A插座)
                                            {
                                                var lightControl = new Phone.Device.Light.PlugControl();
                                                UserView.HomePage.Instance.AddChidren(lightControl);
                                                UserView.HomePage.Instance.PageIndex += 1;
                                                lightControl.Show(device, Room.CurrentRoom);
                                                lightControl.action += (curDev, curRoom) =>
                                                {
                                                    ReFreshEditDeviceAction(device, curRoom, functionView);
                                                };
                                            }
                                            else
                                            {
                                                var lightControl = new Phone.Device.Light.LightControl();
                                                UserView.HomePage.Instance.AddChidren(lightControl);
                                                UserView.HomePage.Instance.PageIndex += 1;
                                                lightControl.Show(device, Room.CurrentRoom);
                                                lightControl.action += (curDev, curRoom) =>
                                                {
                                                    ReFreshEditDeviceAction(device, curRoom, functionView);
                                                };
                                            }
                                                ReFreshEditDeviceAction(device, curRoom, functionView);
                                            };
                                        };
                                        functionView.CollectButton.MouseUpEventHandler += collectionEvent;