Beispiel #1
0
 private void NextViewModel()
 {
     if (CurrentPageViewModel.SaveContent())
     {
         int current_index = PageViewModels.FindIndex(vm => vm == CurrentPageViewModel);
         if (current_index + 1 != PageViewModels.Count)
         {
             CurrentPageViewModel = PageViewModels[current_index + 1];
         }
     }
 }
Beispiel #2
0
 private void ChangeViewModel(IPageViewModel viewModel)
 {
     /*
      * if (!PageViewModels.Contains(viewModel))
      * {
      *  PageViewModels.Add(viewModel);
      * }
      */
     if (CurrentPageViewModel.SaveContent())
     {
         CurrentPageViewModel = PageViewModels.FirstOrDefault(vm => vm == viewModel);
     }
 }