File was renamed from ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlSceneLogic.cs |
| | |
| | | using System.Threading.Tasks; |
| | | using ZigBee.Device; |
| | | |
| | | namespace Shared.Phone.UserCenter |
| | | namespace Shared.Phone |
| | | { |
| | | /// <summary> |
| | | /// 场景的逻辑 |
| | |
| | | //加入缓存 |
| | | this.dicScenes[newScene.Id] = newScene; |
| | | //备份 |
| | | HdlAutoBackupLogic.AddOrEditorFile(newScene.FileName); |
| | | HdlBackupLogic.Current.AddOrEditorAutoBackFileStatu(newScene.FileName); |
| | | } |
| | | |
| | | } |
| | |
| | | //添加场景失败 |
| | | string msg1 = Language.StringByID(R.MyInternationalizationString.AddSceneFail); |
| | | //拼接上【网关回复超时】的Msg |
| | | msg1 = UserCenterLogic.CombineGatewayTimeOutMsg(msg1, result); |
| | | msg1 = HdlCommonLogic.Current.CombineGatewayTimeOutMsg(msg1, result); |
| | | this.ShowTipMsg(msg1); |
| | | return null; |
| | | } |
| | |
| | | //初始化执行目标失败 |
| | | string msg1 = Language.StringByID(R.MyInternationalizationString.uInitAdjustTargetFail); |
| | | //拼接上【网关回复超时】的Msg |
| | | msg1 = UserCenterLogic.CombineGatewayTimeOutMsg(msg1, result); |
| | | msg1 = HdlCommonLogic.Current.CombineGatewayTimeOutMsg(msg1, result); |
| | | this.ShowTipMsg(msg1); |
| | | return false; |
| | | } |
| | |
| | | } |
| | | var result1 = await Scene.RenameSceneAsync(scene.Id, newName); |
| | | //共通错误检测 |
| | | string error = HdlCheckLogic.Current.CheckCommonErrorCode(result1); |
| | | string error = HdlCheckLogic.Current.CheckGatewayErrorCode(result1); |
| | | if (error != null) |
| | | { |
| | | this.ShowErrorMsg(error); |
| | |
| | | //修改场景名称失败 |
| | | string msg1 = Language.StringByID(R.MyInternationalizationString.uEditorSceneNameFail); |
| | | //拼接上【网关回复超时】的Msg |
| | | msg1 = UserCenterLogic.CombineGatewayTimeOutMsg(msg1, result1); |
| | | msg1 = HdlCommonLogic.Current.CombineGatewayTimeOutMsg(msg1, result1); |
| | | this.ShowTipMsg(msg1); |
| | | return false; |
| | | } |
| | |
| | | if (Global.IsExistsByHomeId(sceneUI.FileName) == true) |
| | | { |
| | | Global.DeleteFilebyHomeId(sceneUI.FileName); |
| | | HdlAutoBackupLogic.DeleteFile(sceneUI.FileName); |
| | | HdlBackupLogic.Current.DeleteAutoBackFileStatu(sceneUI.FileName); |
| | | } |
| | | //删除图片 |
| | | if (sceneUI.IconPathType == 1 || sceneUI.IconPathType == 2) |
| | |
| | | if (Global.IsExistsByHomeId(sceneUI.IconPath)) |
| | | { |
| | | Global.DeleteFilebyHomeId(sceneUI.IconPath); |
| | | HdlAutoBackupLogic.DeleteFile(sceneUI.IconPath); |
| | | HdlBackupLogic.Current.DeleteAutoBackFileStatu(sceneUI.IconPath); |
| | | } |
| | | } |
| | | //删除场景时,需要刷新主页 |
| | |
| | | //控制场景失败 |
| | | string msg = Language.StringByID(R.MyInternationalizationString.ControlSceneFail); |
| | | //拼接上【网关回复超时】的Msg |
| | | msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, result); |
| | | msg = HdlCommonLogic.Current.CombineGatewayTimeOutMsg(msg, result); |
| | | HdlThreadLogic.Current.RunMain(() => |
| | | { |
| | | //该场景正在延时,请稍后 |
| | |
| | | //获取执行目标失败 |
| | | string msg = Language.StringByID(R.MyInternationalizationString.uGetAdjustTargetFail); |
| | | //拼接上【网关回复超时】的Msg |
| | | msg = UserCenterLogic.CombineGatewayTimeOutMsg(msg, result); |
| | | msg = HdlCommonLogic.Current.CombineGatewayTimeOutMsg(msg, result); |
| | | |
| | | this.ShowTipMsg(msg); |
| | | return null; |