コード例 #1
0
        private void ChangeViewModel(aBenchViewModel viewModel)
        {
            if (!PageViewModels.Contains(viewModel))
            {
                PageViewModels.Add(viewModel);
            }

            CurrentPageViewModel = PageViewModels
                                   .FirstOrDefault(vm => vm == viewModel);
        }
コード例 #2
0
//TODO
// UPDATE THE PICTURE of ENs at THE END OF EACH USER INTERACTION

        public void ChangeThePage()
        {
            if (_nextPageViewModel == null)
            {
                if (PageViewModels.Count > 1)
                {
                    if (PageViewModels.IndexOf(_currentPageViewModel) == (PageViewModels.Count - 1))
                    {
                        _nextPageViewModel = PageViewModels[0];
                    }
                    else
                    {
                        _nextPageViewModel = PageViewModels[PageViewModels.IndexOf(_currentPageViewModel) + 1];
                    }
                }
                else
                {
                    _nextPageViewModel = _currentPageViewModel;
                }
            }
            ChangeViewModel(_nextPageViewModel);
        }