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