Esempio n. 1
0
 public void BackupAll()
 {
     MoviesViewModel.Backup();
     SerialsViewModel.Backup();
     GamesViewModel.Backup();
     BooksViewModel.Backup();
 }
Esempio n. 2
0
 public void SaveAll()
 {
     MoviesViewModel.Save();
     SerialsViewModel.Save();
     GamesViewModel.Save();
     BooksViewModel.Save();
 }
Esempio n. 3
0
 public void SaveSettings()
 {
     MoviesViewModel.SaveSettings();
     SerialsViewModel.SaveSettings();
     GamesViewModel.SaveSettings();
     BooksViewModel.SaveSettings();
     MainViewModel.Default.AppSettings.SaveAppSettings();
 }
Esempio n. 4
0
        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, "Сделать резервые копии для всех");
        }
Esempio n. 5
0
 public void SaveUnsaved()
 {
     if (MoviesViewModel.NeedSave)
     {
         MoviesViewModel.Save();
     }
     if (SerialsViewModel.NeedSave)
     {
         SerialsViewModel.Save();
     }
     if (BooksViewModel.NeedSave)
     {
         BooksViewModel.Save();
     }
     if (GamesViewModel.NeedSave)
     {
         GamesViewModel.Save();
     }
 }