gxc
2019-11-04 b7b3e92bed9c4553e30e2901a1877f088a5f8823
ZigbeeApp/Shared/Phone/Device/Light/LightControl.cs
old mode 100755 new mode 100644
@@ -121,10 +121,10 @@
                        }
                        if (deviceUI.CommonDevice.Type == DeviceType.OnOffOutput)
                        {
                            if ((common as ToggleLight).DeviceStatusReport.CluterID == 6)
                            if (common.DeviceStatusReport.CluterID == 6)
                            {
                                var light = deviceUI.CommonDevice as ToggleLight;
                                light.DeviceStatusReport = (common as ToggleLight).DeviceStatusReport;
                                light.DeviceStatusReport = common.DeviceStatusReport;
                                //记录、更新状态
                                if (light.DeviceStatusReport.AttriBute == null || light.DeviceStatusReport.AttriBute.Count == 0)
                                {
@@ -157,8 +157,8 @@
        public override void RemoveFromParent()
        {
            ZbGateway.StatusList.Remove(this);
            action();
            action = null;
            //action();
            //action = null;
            RemoveUpdateControlDeviceStatuAction();
            base.RemoveFromParent();
        }
@@ -475,12 +475,12 @@
            //collection
            if ((sender as Button).IsSelected)
            {
                Shared.Common.Room.GetLoveRoom().DeleteDevice(device.FileName);
                Shared.Common.Room.CurrentRoom.GetLoveRoom().DeleteDevice(device.FileName);
                (sender as Button).IsSelected = false;
            }
            else
            {
                Shared.Common.Room.GetLoveRoom().AddDevice(device.FileName);
                Shared.Common.Room.CurrentRoom.GetLoveRoom().AddDevice(device.FileName);
                (sender as Button).IsSelected = true;
            }
        }