public void MenuItemCallback(object sender, EventArgs e) { var settingsHelper = new ExtensionSettingsHelper(); var settings = settingsHelper.GetSettings(); var documentationControl = new UI.RestoreBackedupSuoDialog(); documentationControl.DataContext = new RestoreBackedupSuoDialogVM(settings); documentationControl.ShowDialog(); }
public void BackupCurrentSuo(string backupFileNameWithoutExtensions) { EnsureBackupFolderExists(); var backupFileFullPath = Path.Combine(ExpectedSuoBackupFolderPath, backupFileNameWithoutExtensions + SuoBackupFileExtension); File.Copy(ExpectedSuoFilePath, backupFileFullPath); var settingsHelper = new ExtensionSettingsHelper(); var settings = settingsHelper.GetSettings(); settings.SuoBackups.Remove(SlnFilePath); var existingBackups = GetExistingSuoBackupNames(); settings.SuoBackups.Add(SlnFilePath, existingBackups); settingsHelper.SaveSettings(settings); }