old mode 100755
new mode 100644
| | |
| | | /// <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; |
| | | |
| | |
| | | custompushview.iconBtn.Visible = true; |
| | | custompushview.iconBtn.UnSelectedImagePath = "ZigeeLogic/next.png"; |
| | | custompushview.titleBtn.TextID = MyInternationalizationString.custompush; |
| | | custompushview.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor; |
| | | middle.AddChidren(custompushview.AddDeviceView()); |
| | | |
| | | EventHandler<MouseEventArgs> customclick = (sender, e) => |
| | |
| | | LogicView.IfString.Tag = true; |
| | | custompushview.frameLayout.Height = Application.GetRealHeight(160); |
| | | Common.Logic.CurrentLogic.LogicIsCustomPushText = 1; |
| | | pushview.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicRowLayoutLineColor; |
| | | |
| | | } |
| | | else |
| | |
| | | LogicView.IfString.Tag = false; |
| | | custompushview.frameLayout.Height = Application.GetRealHeight(0); |
| | | Common.Logic.CurrentLogic.LogicIsCustomPushText = 0; |
| | | pushview.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor; |
| | | } |
| | | Send.Zj(LogicView.IfString.Tag, Common.Logic.CurrentLogic); |
| | | }; |
| | |
| | | LogicView.IfString.Tag = false; |
| | | pushview.switchBtn.IsSelected = false; |
| | | custompushview.frameLayout.Height = Application.GetRealHeight(0); |
| | | pushview.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor; |
| | | } |
| | | else |
| | | { |
| | | LogicView.IfString.Tag = true; |
| | | pushview.switchBtn.IsSelected = true; |
| | | custompushview.frameLayout.Height = Application.GetRealHeight(160); |
| | | pushview.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicRowLayoutLineColor; |
| | | } |
| | | } |
| | | /// <summary> |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <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); |
| | | } |
| | | } |
| | | } |