private bool BackUpWithDatabase() { if (!Directory.Exists(FullBackupLocationDBDataPath)) { Directory.CreateDirectory(FullBackupLocationDBDataPath); } int backupID = LoadedBackupDB.StartBackup(); DialogResult backupResult = _progressDialog.StartProgressDialog(_generalResourceManager.GetString("BackupProgressTitle"), _generalResourceManager.GetString("BackupProgressText"), _source.SourceSize.Value, bg_BackUpWithDatabase_DoWork, backupID); if (backupResult != DialogResult.Cancel) { LoadedBackupDB.CompleteBackup(backupID); LoadedBackupDB.WriteDatabaseToFile(); return(true); } else { return(false); } }
internal bool RestoreFilesToDestination(Dictionary <string, string> restoreList, string destinationPath) { KeyValuePair <string, Dictionary <string, string> > args = new KeyValuePair <string, Dictionary <string, string> >(destinationPath, restoreList); DialogResult whatHappened = _progressDialog.StartProgressDialog(_generalResourceManager.GetString("RestoringFilesProgressTitle"), _generalResourceManager.GetString("RestoringFilesProgressText"), restoreList.Count, bg_RestoreFilesToDestination_DoWork, args); if (whatHappened != DialogResult.Cancel) { return(true); } else { return(false); } }