public void BackupAll() { MoviesViewModel.Backup(); SerialsViewModel.Backup(); GamesViewModel.Backup(); BooksViewModel.Backup(); }
public void SaveAll() { MoviesViewModel.Save(); SerialsViewModel.Save(); GamesViewModel.Save(); BooksViewModel.Save(); }
public void SaveSettings() { MoviesViewModel.SaveSettings(); SerialsViewModel.SaveSettings(); GamesViewModel.SaveSettings(); BooksViewModel.SaveSettings(); MainViewModel.Default.AppSettings.SaveAppSettings(); }
public MainViewModel() { Default = this; AppSettings = Repository.LoadAppSettings(); MoviesViewModel = new MoviesViewModel(); SerialsViewModel = new SerialsViewModel(); GamesViewModel = new GamesViewModel(); BooksViewModel = new BooksViewModel(); SaveSettingsCommand = new RelayCommand(SaveSettings, "Сохранить настройки"); SaveAllCommand = new RelayCommand(SaveAll, "Сохранить все"); BackupAllCommand = new RelayCommand(BackupAll, "Сделать резервые копии для всех"); }
public void SaveUnsaved() { if (MoviesViewModel.NeedSave) { MoviesViewModel.Save(); } if (SerialsViewModel.NeedSave) { SerialsViewModel.Save(); } if (BooksViewModel.NeedSave) { BooksViewModel.Save(); } if (GamesViewModel.NeedSave) { GamesViewModel.Save(); } }