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