old mode 100755
new mode 100644
| | |
| | | /// </summary> |
| | | public class MutilfunctionPanelMethod |
| | | { |
| | | #region 变量申明 |
| | | #region 变量申明 |
| | | /// <summary> |
| | | /// 开关的个数 [每次进入到多功能绑定界面,都要被重新取值] |
| | | /// </summary> |
| | |
| | | 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) |
| | | { |
| | |
| | | //空调绑定类型 |
| | | if (device.Type == DeviceType.Thermostat && bDev.BindCluster == 513) |
| | | { |
| | | //Thermostat是空调 |
| | | tempList.Add(bDev); |
| | | } |
| | | } |
| | |
| | | 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) |
| | |
| | | //空调绑定类型 |
| | | if (device.Type == DeviceType.Thermostat && bDev.BindCluster == 513) |
| | | { |
| | | //Thermostat是空调 |
| | | tempList.Remove(bDev.KeyEpoint); |
| | | } |
| | | } |
| | |
| | | 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) |
| | |
| | | case 5: |
| | | if (device.Type == DeviceType.Thermostat) |
| | | { |
| | | //Thermostat是空调 |
| | | if (BindInfo.checkRealAcDevice(device) == false) |
| | | { |
| | | continue; |
| | | } |
| | | roomIncludeMatchDevice.Add(device); |
| | | } |
| | | break; |
| | |
| | | /// <param name="currentPanelSupportBindDeviceList"></param> |
| | | /// <param name="supportRoomList"></param> |
| | | /// <param name="curDeviceBindType">当前设备绑定类型 1:开关 2:插座 3:灯光 4:遮阳 5:空调 6:新风</param> |
| | | /// <param name="curBindTypeList">当前类型的绑定表</param> |
| | | /// <param name="curBindTypeList">当前类型的绑定表</param> |
| | | /// <returns></returns> |
| | | public static List<CommonDevice> GetAllRoomSupportDeviceList(List<CommonDevice> currentPanelSupportBindDeviceList, List<Room> supportRoomList, List<BindListAllInfo> curBindTypeList, int curDeviceBindType) |
| | | { |
| | |
| | | { |
| | | 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) |
| | |
| | | case 5: |
| | | if (device.Type == DeviceType.Thermostat) |
| | | { |
| | | //Thermostat是空调 |
| | | if (BindInfo.checkRealAcDevice(device) == false) |
| | | { |
| | | continue; |
| | | } |
| | | currentPanelBindSupportDeviceListTemp.Add(device); |
| | | } |
| | | break; |
| | |
| | | /// </summary> |
| | | /// <param name="currentPanelSupportBindSceneList"></param> |
| | | /// <param name="supportRoomList"></param> |
| | | /// <param name="curBindTypeList">当前类型的绑定表</param> |
| | | /// <param name="curBindTypeList">当前类型的绑定表</param> |
| | | /// <param name="curDeviceBindType">当前设备绑定类型 0:场景</param> |
| | | /// <returns></returns> |
| | | public static List<SceneUI> GetAllRoomSupportSceneList(List<SceneUI> currentPanelSupportBindSceneList, List<Room> supportRoomList, List<BindListAllInfo> curBindTypeList, int curDeviceBindType = 0) |
| | |
| | | undistruibuteDevList.Add(device); |
| | | } |
| | | } |
| | | if (device.Type == DeviceType.DimmableLight) |
| | | { |
| | | undistruibuteDevList.Add(device); |
| | | } |
| | | break; |
| | | case 4: |
| | | if (device.Type == DeviceType.WindowCoveringDevice) |
| | |
| | | case 5: |
| | | if (device.Type == DeviceType.Thermostat) |
| | | { |
| | | //Thermostat是空调 |
| | | if (BindInfo.checkRealAcDevice(device) == false) |
| | | { |
| | | continue; |
| | | } |
| | | undistruibuteDevList.Add(device); |
| | | } |
| | | break; |
| | |
| | | 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); |
| | | } |
| | | } |
| | |
| | | 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: |