| | |
| | | //不能删除Config文件
|
| | | return true;
|
| | | }
|
| | | else if (fileName.StartsWith("DeviceUI_") == true)
|
| | | {
|
| | | //不能删除设备UI文件
|
| | | return true;
|
| | | }
|
| | | else if (fileName.StartsWith("House_") == true)
|
| | | {
|
| | | //不能删除住宅文件
|
| | |
| | | try
|
| | | {
|
| | | ZigBee.Device.ZbGateway.RemoteMqttClient?.DisconnectAsync();
|
| | | ZigBee.Device.ZbGateway.RemoteMqttClient = null;
|
| | | }
|
| | | catch { }
|
| | |
|
| | |
| | | //同步云端的网关id,如果本地拥有云端不存在的id,则表示应该被换绑了,直接删除
|
| | | HdlGatewayLogic.Current.SynchronizeDbGateway();
|
| | |
|
| | | //初始化住宅对象
|
| | | Common.Config.Instance.Home = House.GetHouseByHouseId(Common.Config.Instance.HomeId);
|
| | |
|
| | | //初始化房间(郭雪城那边不做处理,需要这里特殊执行一步)
|
| | | Room.RefreshAllRoomByLocation();
|
| | |
|
| | |
| | | ProgressBar.SetAppendText(string.Empty);
|
| | |
|
| | | //0:已经同步过,不需要同步,这个时候需要提示备份
|
| | | if (result == 0)
|
| | | {
|
| | | //开启自动备份提示
|
| | | //HdlAutoBackupLogic.ShowAutoBackupPromptedForm();
|
| | | }
|
| | | //if (result == 0)
|
| | | //{
|
| | | // //开启自动备份提示
|
| | | // HdlAutoBackupLogic.ShowAutoBackupPromptedForm();
|
| | | //}
|
| | | }
|
| | |
|
| | | //恢复可关闭进度条
|
| | |
| | | Global.CreateEmptyDirectory(directory);
|
| | |
|
| | | //用户图片目录路径【文件夹】
|
| | | if (!System.IO.Directory.Exists(UserCenterResourse.Option.UserPictruePath)) |
| | | if (UserCenterResourse.Option.UserPictruePath != string.Empty && !System.IO.Directory.Exists(UserCenterResourse.Option.UserPictruePath)) |
| | | { |
| | | System.IO.Directory.CreateDirectory(UserCenterResourse.Option.UserPictruePath); |
| | | }
|