xm
2020-07-21 9a4b76398009cf76c508d61f7e48fb6f5cb7ac2d
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/MutilfunctionPanelMethod.cs
old mode 100755 new mode 100644
@@ -48,20 +48,41 @@
            var tempList = new List<BindListAllInfo>();
            int count1 = 0;
            int count2 = 0;
            switch (curBindType)
            {
                case 1:
                    curSwitchCount = 0;
                    break;
                case 2:
                    curSocketCount = 0;
                    break;
                case 3:
                    curLightFromRelayCount = 0;
                    curLightCount = 0;
                    break;
            }
            foreach (var key in bindTargetsFromMutilfunctionPanelList.Keys)
            {
                var bList = bindTargetsFromMutilfunctionPanelList[key];
                foreach (var bDev in bList)
                {
                    if (curBindType == 0)
                    {
                        if (bDev.KeyEpoint >= 32 && bDev.KeyEpoint <= 51)
                        {
                            tempList.Add(bDev);
                        }
                    }
                    var device = LocalDevice.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint);
                    if (device == null)
                    {
                        continue;
                    }
                    switch (curBindType)
                    {
                        case 0:
                            if (bDev.KeyEpoint >= 32 && bDev.KeyEpoint <= 51)
                            {
                                tempList.Add(bDev);
                            }
                            break;
                        case 1:
                            if (bDev.KeyEpoint >= 52 && bDev.KeyEpoint <= 61)
                            {
@@ -128,7 +149,6 @@
                                    //空调绑定类型
                                    if (device.Type == DeviceType.Thermostat && bDev.BindCluster == 513)
                                    {
                                        //Thermostat是空调
                                        tempList.Add(bDev);
                                    }
                                }
@@ -222,15 +242,21 @@
                var bList = bindTargetsFromMutilfunctionPanelList[key];
                foreach (var bDev in bList)
                {
                    if (curBindType == 0)
                    {
                        if (bDev.KeyEpoint >= 32 && bDev.KeyEpoint <= 51)
                        {
                            tempList.Remove(bDev.KeyEpoint);
                        }
                    }
                    var device = LocalDevice.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint);
                    if (device == null)
                    {
                        continue;
                    }
                    switch (curBindType)
                    {
                        case 0:
                            if (bDev.KeyEpoint >= 32 && bDev.KeyEpoint <= 51)
                            {
                                tempList.Remove(bDev.KeyEpoint);
                            }
                            break;
                        case 1:
                        case 2:
                            if (bDev.KeyEpoint >= 52 && bDev.KeyEpoint <= 61)
@@ -296,7 +322,6 @@
                                    //空调绑定类型
                                    if (device.Type == DeviceType.Thermostat && bDev.BindCluster == 513)
                                    {
                                        //Thermostat是空调
                                        tempList.Remove(bDev.KeyEpoint);
                                    }
                                }
@@ -393,10 +418,10 @@
                                                roomIncludeMatchDevice.Add(device);
                                            }
                                        }
                                        if (device.Type == DeviceType.DimmableLight)
                                        {
                                            roomIncludeMatchDevice.Add(device);
                                        }
                                        //if (device.Type == DeviceType.DimmableLight)
                                        //{
                                        //    roomIncludeMatchDevice.Add(device);
                                        //}
                                        break;
                                    case 4:
                                        if (device.Type == DeviceType.WindowCoveringDevice)
@@ -407,7 +432,10 @@
                                    case 5:
                                        if (device.Type == DeviceType.Thermostat)
                                        {
                                            //Thermostat是空调
                                            if (BindInfo.checkRealAcDevice(device) == false)
                                            {
                                                continue;
                                            }
                                            roomIncludeMatchDevice.Add(device);
                                        }
                                        break;
@@ -579,10 +607,10 @@
                                {
                                    currentPanelBindSupportDeviceListTemp.Add(device);
                                }
                                if (device.Type == DeviceType.DimmableLight)
                                {
                                    currentPanelBindSupportDeviceListTemp.Add(device);
                                }
                                //if (device.Type == DeviceType.DimmableLight)
                                //{
                                //    currentPanelBindSupportDeviceListTemp.Add(device);
                                //}
                                break;
                            case 4:
                                if (device.Type == DeviceType.WindowCoveringDevice)
@@ -593,7 +621,10 @@
                            case 5:
                                if (device.Type == DeviceType.Thermostat)
                                {
                                    //Thermostat是空调
                                    if (BindInfo.checkRealAcDevice(device) == false)
                                    {
                                        continue;
                                    }
                                    currentPanelBindSupportDeviceListTemp.Add(device);
                                }
                                break;
@@ -715,10 +746,6 @@
                                    undistruibuteDevList.Add(device);
                                }
                            }
                            if (device.Type == DeviceType.DimmableLight)
                            {
                                undistruibuteDevList.Add(device);
                            }
                            break;
                        case 4:
                            if (device.Type == DeviceType.WindowCoveringDevice)
@@ -729,7 +756,10 @@
                        case 5:
                            if (device.Type == DeviceType.Thermostat)
                            {
                                //Thermostat是空调
                                if (BindInfo.checkRealAcDevice(device) == false)
                                {
                                    continue;
                                }
                                undistruibuteDevList.Add(device);
                            }
                            break;
@@ -826,21 +856,12 @@
                                    curRoomDeviceListTemp.Add(device);
                                }
                            }
                            if (device.Type == DeviceType.DimmableLight)
                            {
                                if (deviceEnumInfo.ConcreteType != Common.DeviceConcreteType.ButtonPanel_SimpleMultifunction)
                                {
                                    //Thermostat是空调
                                    curRoomDeviceListTemp.Add(device);
                                }
                            }
                            break;
                        case 4:
                            if (device.Type == DeviceType.WindowCoveringDevice)
                            {
                                if (deviceEnumInfo.ConcreteType != Common.DeviceConcreteType.ButtonPanel_SimpleMultifunction)
                                {
                                    //Thermostat是空调
                                    curRoomDeviceListTemp.Add(device);
                                }
                            }
@@ -848,11 +869,11 @@
                        case 5:
                            if (device.Type == DeviceType.Thermostat)
                            {
                                if (deviceEnumInfo.ConcreteType != Common.DeviceConcreteType.ButtonPanel_SimpleMultifunction)
                                if (BindInfo.checkRealAcDevice(device) == false)
                                {
                                    //Thermostat是空调
                                    curRoomDeviceListTemp.Add(device);
                                    continue;
                                }
                                curRoomDeviceListTemp.Add(device);
                            }
                            break;
                        case 6: