| | |
| | | //刷新住宅对象 |
| | | RefreshHomeObject(); |
| | | //根据模板文件,恢复数据 |
| | | TemplateData.TemplateCommonLogic.Current.RecoverDataByTemplateBinFile(); |
| | | HdlTemplateCommonLogic.Current.RecoverDataByTemplateBinFile(); |
| | | //强制生成设备和网关文件 |
| | | TemplateData.TemplateCommonLogic.Current.CreatDeviceAndGatewayFileFromMemoryByForce(); |
| | | HdlTemplateCommonLogic.Current.CreatDeviceAndGatewayFileFromMemoryByForce(); |
| | | //刷新本地网关文件 |
| | | HdlGatewayLogic.Current.ReFreshByLocal(); |
| | | //刷新本地设备 |
| | |
| | | int result = -1; |
| | | if (hadNet == 1) |
| | | { |
| | | result = HdlAutoBackupLogic.SynchronizeDbAutoBackupData(); |
| | | result = HdlBackupLogic.Current.SynchronizeDbAutoBackupData(); |
| | | } |
| | | |
| | | //初始化本地的网关信息 |
| | |
| | | if (hadNet == 1) |
| | | { |
| | | //同步云端的网关id,如果本地拥有云端不存在的id,则表示应该被换绑了,直接删除 |
| | | HdlGatewayLogic.Current.SynchronizeDbGateway(); |
| | | //HdlGatewayLogic.Current.SynchronizeDbGateway(); |
| | | } |
| | | |
| | | //断开远程Mqtt连接,重新连接 |
| | |
| | | if (result == 0 && i_isLogin == true) |
| | | { |
| | | //开启自动备份 |
| | | HdlAutoBackupLogic.ShowAutoBackupPromptedForm(); |
| | | HdlBackupLogic.Current.ShowAutoBackupPromptedForm(); |
| | | } |
| | | //显示引导界面 |
| | | HdlFormLogic.Current.ShowGuideForm(result); |