| | |
| | | /// <summary> |
| | | /// 排列所有设备类型的列表 |
| | | /// </summary> |
| | | /// <param name="type">判断字符串</param> |
| | | /// <param name="devicelist">设备列表</param> |
| | | /// <returns></returns> |
| | | public static List<string> GetDeviceTypeList(string type, List<CommonDevice> devicelist) |
| | | public static List<string> GetDeviceTypeList(List<CommonDevice> devicelist) |
| | | { |
| | | List<string> devicetypelist = new List<string>(); |
| | | devicetypelist.Clear(); |
| | | var lightjosn = devicelist.Find((device) => device.Type == DeviceType.ColorDimmableLight || device.Type == DeviceType.OnOffOutput); |
| | | var lightjosn = devicelist.Find((device) => device.Type == DeviceType.DimmableLight || device.Type == DeviceType.OnOffOutput); |
| | | if (lightjosn != null) |
| | | { |
| | | devicetypelist.Add(Language.StringByID(MyInternationalizationString.Lights)); |
| | |
| | | } |
| | | break; |
| | | case "action_logic": |
| | | { //自动化支持的目标设备 |
| | | { |
| | | |
| | | //自动化支持的目标设备 |
| | | deviceTypeList.Add(DeviceType.OnOffOutput); |
| | | deviceTypeList.Add(DeviceType.DimmableLight); |
| | | deviceTypeList.Add(DeviceType.WindowCoveringDevice); |
| | | deviceTypeList.Add(DeviceType.Thermostat); |
| | | deviceTypeList.Add(DeviceType.AirSwitch); |
| | | ///门锁特殊 |
| | | deviceTypeList.Add(DeviceType.DoorLock); |
| | | } |
| | | break; |
| | | case "condition_mould": |
| | |
| | | deviceTypeList.Add(DeviceType.WindowCoveringDevice); |
| | | deviceTypeList.Add(DeviceType.Thermostat); |
| | | deviceTypeList.Add(DeviceType.AirSwitch); |
| | | ///门锁特殊 |
| | | deviceTypeList.Add(DeviceType.DoorLock); |
| | | } |
| | | break; |
| | | |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 跳入输出目标功能界面的方法 |
| | | /// </summary> |
| | | /// <param name="str1">设备界面识别字符串</param> |
| | | /// <param name="str2">场景界面识别字符串</param> |
| | | public static void View(string str1, string str2) |
| | | { |
| | | var deviceTarget = new DeviceTarget(); |
| | | UserView.HomePage.Instance.AddChidren(deviceTarget); |
| | | UserView.HomePage.Instance.PageIndex += 1; |
| | | deviceTarget.Show(str1, str2); |
| | | } |
| | | } |
| | | } |