| | |
| | | case DeviceType.IASZone: |
| | | { |
| | | var iASZonedevice = deviceinof as IASZone; |
| | | var intvalue = conditions["AttriButeData1"]; |
| | | //var intvalue = conditions["AttriButeData1"]; |
| | | string if_value = "5"; |
| | | var intvalue = conditions["Range"]; |
| | | icon = $"ZigeeLogic/sensor{iASZonedevice.IasDeviceType}.png"; |
| | | switch (iASZonedevice.IasDeviceType) |
| | | { |
| | | case 13: |
| | | { |
| | | if (conditions["Cluster_ID"] == "1024") |
| | | if (conditions["Cluster_ID"] == "1024")
|
| | | { |
| | | state = Language.StringByID(MyInternationalizationString.ambientLight) + "<" + conditions["AttriButeData1"] + "lux" + Language.StringByID(MyInternationalizationString.hour1); |
| | | } |
| | | else |
| | | { |
| | | if (conditions.ContainsKey("IgnoreTime")) |
| | | |
| | | |
| | | if (conditions.ContainsKey("IgnoreTime")&& conditions["IgnoreTime"]!="0") |
| | | { |
| | | int minute = int.Parse(conditions["IgnoreTime"]) / 60; |
| | | int second = int.Parse(conditions["IgnoreTime"]) % 60; |
| | |
| | | case 21: |
| | | case 22: |
| | | { |
| | | if (conditions.ContainsKey("IgnoreTime")) |
| | | { |
| | | |
| | | if (conditions.ContainsKey("IgnoreTime")&&conditions["IgnoreTime"] != "0") |
| | | { |
| | | int minute = int.Parse(conditions["IgnoreTime"]) / 60; |
| | | int second = int.Parse(conditions["IgnoreTime"]) % 60; |
| | | if (minute != 0 && second != 0) |
| | |
| | | } |
| | | else |
| | | { |
| | | if (intvalue == "1") |
| | | if (intvalue == if_value) |
| | | { |
| | | state = Language.StringByID(MyInternationalizationString.logicopen); |
| | | } |
| | |
| | | break; |
| | | case 40: |
| | | { |
| | | if (intvalue == "1") |
| | | if (intvalue == if_value) |
| | | { |
| | | state =Language.StringByID(MyInternationalizationString.smokescreen); |
| | | } |
| | |
| | | break; |
| | | case 42: |
| | | { |
| | | if (intvalue == "1") |
| | | if (intvalue == if_value) |
| | | { |
| | | state =Language.StringByID( MyInternationalizationString.waterleakage); |
| | | } |
| | |
| | | break; |
| | | case 43: |
| | | { |
| | | if (intvalue == "1") |
| | | if (intvalue == if_value) |
| | | { |
| | | state =Language.StringByID( MyInternationalizationString.gas); |
| | | } |
| | |
| | | break; |
| | | case 277: |
| | | { |
| | | if (intvalue == "1") |
| | | if (intvalue == if_value) |
| | | { |
| | | state =Language.StringByID( MyInternationalizationString.callthepolice); |
| | | } |
| | |
| | | break; |
| | | default: |
| | | { |
| | | if (intvalue == "1") |
| | | if (intvalue == if_value) |
| | | { |
| | | state =Language.StringByID(MyInternationalizationString.callthepolice); |
| | | } |
| | |
| | | alert.ConfirmClickEvent += () => |
| | | { |
| | | Common.Logic.CurrentLogic.Conditions.Remove(conditions); |
| | | var exist = Common.Logic.CurrentLogic.Conditions.Find((obj) => obj["Type"] == "7"); |
| | | if (exist == null) |
| | | { |
| | | //如果没有开启GPS服务,打开服务并且保存状态在本地; |
| | | Application.StopGPSLocationService(); |
| | | Send.SaveLocalFile("GPS_File", "0"); |
| | | } |
| | | selecteddevice.selecetdFrameLayout.RemoveFromParent(); |
| | | //var logicCommunalPage = new LogicCommunalPage(); |
| | | //UserView.HomePage.Instance.AddChidren(logicCommunalPage); |
| | | //UserView.HomePage.Instance.PageIndex += 1; |
| | | //logicCommunalPage.Show(() => { }); |
| | | }; |
| | | |
| | | }; |
| | |
| | | { |
| | | var intvalue = int.Parse(tasks["Data1"]); |
| | | var colorTemperatureValue = 1000000 / (intvalue * 100); |
| | | state += Language.StringByID(MyInternationalizationString.colorTemperature) + colorTemperatureValue.ToString() + "K"; |
| | | state += Language.StringByID(MyInternationalizationString.colorTemperature) + colorTemperatureValue.ToString() + "00K"; |
| | | } |
| | | break; |
| | | } |