public async Task <OperationResult> RestoreBackup() { var result = await backupManager.RestoreBackup(); if (result.Success) { settingsFacade.LastDatabaseUpdate = DateTime.Now; } return(result); }
private async void RestoreBackup() { if (!await ShowOverwriteDataInfo()) { return; } dialogService.ShowLoadingDialog(); await backupManager.RestoreBackup(); dialogService.HideLoadingDialog(); await ShowCompletionNote(); }
private async void RestoreBackup() { if (!await ShowOverwriteDataInfo()) { return; } IsLoading = true; await backupManager.RestoreBackup(); await ShowCompletionNote(); IsLoading = false; }
private async void RestoreBackup() { if (!await ShowOverwriteDataInfo()) { return; } try { dialogService.ShowLoadingDialog(); await backupManager.RestoreBackup(); dialogService.HideLoadingDialog(); await ShowCompletionNote(); } catch (Exception) { await dialogService.ShowMessage(Strings.SomethingWentWrongTitle, Strings.ErrorMessageRestore); } }
/// <summary> /// Restores the backup from OneDrive when the backup is newer then the last modification. /// </summary> public async Task RestoreBackupIfNewer() { try { globalBusyIndicatorState.IsActive = true; if (!SettingsHelper.IsBackupAutouploadEnabled) { globalBusyIndicatorState.IsActive = false; return; } var backupDate = await backupManager.GetBackupDate(); if (backupDate > SettingsHelper.LastDatabaseUpdate) { await backupManager.RestoreBackup(); } } catch (OneDriveException ex) { Mvx.Trace(MvxTraceLevel.Error, ex.Message); } globalBusyIndicatorState.IsActive = false; }
public async Task RestoreBackup() { await backupManager.RestoreBackup(); settingsFacade.LastDatabaseUpdate = DateTime.Now; }