File was renamed from ZigbeeApp/Shared/Phone/Common/Logic/HdlDeviceCurtainLogic.cs |
| | |
| | | using System.Threading.Tasks; |
| | | using ZigBee.Device; |
| | | |
| | | namespace Shared.Phone |
| | | namespace Shared.Phone.UserCenter |
| | | { |
| | | /// <summary> |
| | | /// 窗帘的逻辑 |
| | |
| | | //切换手拉控制失败 |
| | | string msg = Language.StringByID(R.MyInternationalizationString.uChangeHandPullControlFail); |
| | | //拼接上【网关回复超时】的Msg |
| | | msg = HdlCommonLogic.Current.CombineGatewayTimeOutMsg(msg, result); |
| | | msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, result); |
| | | this.ShowTipMsg(msg); |
| | | return false; |
| | | } |
| | |
| | | { |
| | | var result = this.SetCurtainDirectionAsync(rollershade, bolStatu); |
| | | //检测网关返回的共通错误状态码 |
| | | string error = HdlCheckLogic.Current.CheckGatewayErrorCode(result); |
| | | string error = HdlCheckLogic.Current.CheckCommonErrorCode(result); |
| | | if (error != null) |
| | | { |
| | | this.ShowTipMsg(error); |
| | |
| | | //窗帘方向设置失败 |
| | | string msg = Language.StringByID(R.MyInternationalizationString.uSetCurtainDirectionFail); |
| | | //拼接上【网关回复超时】的Msg |
| | | msg = HdlCommonLogic.Current.CombineGatewayTimeOutMsg(msg, result); |
| | | msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, result); |
| | | this.ShowTipMsg(msg); |
| | | return false; |
| | | } |
| | |
| | | //设置窗帘限位点失败 |
| | | string msg = Language.StringByID(R.MyInternationalizationString.uCommitCurtainLimitFail); |
| | | //拼接上【网关回复超时】的Msg |
| | | msg = HdlCommonLogic.Current.CombineGatewayTimeOutMsg(msg, result); |
| | | msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, result); |
| | | this.ShowTipMsg(msg); |
| | | return false; |
| | | } |
| | |
| | | //result = await HdlDeviceAttributeLogic.Current.WriteDeviceAttribute(rollershade, 258, 24, 65, sendData); |
| | | } |
| | | //检测网关返回的共通错误状态码 |
| | | string error = HdlCheckLogic.Current.CheckGatewayErrorCode(result); |
| | | string error = HdlCheckLogic.Current.CheckCommonErrorCode(result); |
| | | if (error != null) |
| | | { |
| | | this.ShowTipMsg(error); |
| | |
| | | //设置窗帘限位点失败 |
| | | string msg = Language.StringByID(R.MyInternationalizationString.uCommitCurtainLimitFail); |
| | | //拼接上【网关回复超时】的Msg |
| | | msg = HdlCommonLogic.Current.CombineGatewayTimeOutMsg(msg, result); |
| | | msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, result); |
| | | this.ShowTipMsg(msg); |
| | | return false; |
| | | } |
| | |
| | | { |
| | | var result = await rollershade.DeleteCurtainLimitsAsync(limiType); |
| | | //检测网关返回的共通错误状态码 |
| | | string error = HdlCheckLogic.Current.CheckGatewayErrorCode(result); |
| | | string error = HdlCheckLogic.Current.CheckCommonErrorCode(result); |
| | | if (error != null) |
| | | { |
| | | this.ShowTipMsg(error); |
| | |
| | | //重置窗帘限位点失败 |
| | | string msg = Language.StringByID(R.MyInternationalizationString.uDeleteCurtainLimitFail); |
| | | //拼接上【网关回复超时】的Msg |
| | | msg = HdlCommonLogic.Current.CombineGatewayTimeOutMsg(msg, result); |
| | | msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, result); |
| | | this.ShowTipMsg(msg); |
| | | return false; |
| | | } |
| | |
| | | { |
| | | var result = await rollershade.RestoreCurtainLimitAsync(); |
| | | //检测网关返回的共通错误状态码 |
| | | string error = HdlCheckLogic.Current.CheckGatewayErrorCode(result); |
| | | string error = HdlCheckLogic.Current.CheckCommonErrorCode(result); |
| | | if (error != null) |
| | | { |
| | | this.ShowTipMsg(error); |
| | |
| | | //重置窗帘失败 |
| | | string msg = Language.StringByID(R.MyInternationalizationString.uRestoreCurtainFail); |
| | | //拼接上【网关回复超时】的Msg |
| | | msg = HdlCommonLogic.Current.CombineGatewayTimeOutMsg(msg, result); |
| | | msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, result); |
| | | this.ShowTipMsg(msg); |
| | | return false; |
| | | } |