File was renamed from ZigbeeApp/Shared/Phone/Common/Logic/HdlDevicePirSensorLogic.cs |
| | |
| | | using System.Threading.Tasks; |
| | | using Newtonsoft.Json.Linq; |
| | | |
| | | namespace Shared.Phone |
| | | namespace Shared.Phone.UserCenter |
| | | { |
| | | /// <summary> |
| | | /// PIR传感器的逻辑 |
| | |
| | | } |
| | | var data = await iASZone.GetPIRLightAbilitySizeAsync(); |
| | | //共通错误检测 |
| | | string error = HdlCheckLogic.Current.CheckGatewayErrorCode(data); |
| | | string error = HdlCheckLogic.Current.CheckCommonErrorCode(data); |
| | | if (error != null) |
| | | { |
| | | this.ShowErrorMsg(error); |
| | |
| | | //获取传感器光感等级失败 |
| | | string msg = Language.StringByID(R.MyInternationalizationString.uGetPirSensorLightPerceptionRegulationFail); |
| | | //拼接上【网关回复超时】的Msg |
| | | msg = HdlCommonLogic.Current.CombineGatewayTimeOutMsg(msg, data); |
| | | msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, data); |
| | | |
| | | this.ShowErrorMsg(msg); |
| | | return -1; |
| | |
| | | //获取传感器设置信息失败 |
| | | string msg = Language.StringByID(R.MyInternationalizationString.uGetPirSensorSettionFail); |
| | | //拼接上【网关回复超时】的Msg |
| | | msg = HdlCommonLogic.Current.CombineGatewayTimeOutMsg(msg, data); |
| | | msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, data); |
| | | |
| | | this.ShowErrorMsg(msg); |
| | | return null; |
| | |
| | | //获取传感器亮度值失败 |
| | | string msg = Language.StringByID(R.MyInternationalizationString.uGetPirSensorLuxFail); |
| | | //拼接上【网关回复超时】的Msg |
| | | msg = HdlCommonLogic.Current.CombineGatewayTimeOutMsg(msg, data); |
| | | msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, data); |
| | | if (mode == ShowErrorMode.YES) |
| | | { |
| | | this.ShowErrorMsg(msg); |
| | |
| | | //设置传感器配置信息失败 |
| | | string msg = Language.StringByID(R.MyInternationalizationString.uSetPirSensorSettionFail); |
| | | //拼接上【网关回复超时】的Msg |
| | | msg = HdlCommonLogic.Current.CombineGatewayTimeOutMsg(msg, result); |
| | | msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, result); |
| | | |
| | | this.ShowErrorMsg(msg); |
| | | return false; |
| | |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | var contr = new ShowMsgControl(ShowMsgType.Tip, msg); |
| | | var contr = new UserCenter.ShowMsgControl(ShowMsgType.Tip, msg); |
| | | contr.Show(); |
| | | }); |
| | | } |