private void UpdateList() { // Retrieve tasks var contexts = mSessionHandler.GetTasks(); // At the start of the session, first task in the list is always current one, so set it accordingly SetCurrentTask(0, mTimeTasksMapper.ListMapToSession(contexts.WholeList)); }
/// <summary> /// Starts new session out of current tasks /// </summary> private void StartTaskSession() { // Get tasks from Handler sorted like TaskItems var taskContexts = mTimeTasksMapper.MatchTaskOrder(TaskItems.Select(vm => vm as TimeTaskViewModel).ToList(), mSessionHandler.GetTasks().WholeList); // Pass it to the service mSessionHandler.UpdateTasks(taskContexts); // Create brand-new view model for session page var sessionViewModel = mViewModelProvider.GetInjectedPageViewModel <TasksSessionPageViewModel>(); sessionViewModel.InitializeSessionCommand.Execute(null); // Change to session page mApplicationViewModel.GoToPage(ApplicationPage.TasksSession, sessionViewModel); }