/// <summary> /// Default constructor /// </summary> public TasksSessionPageViewModel( TimeTasksMapper timeTasksMapper, IUIManager uiManager, ISessionHandler sessionHandler, ApplicationViewModel applicationViewModel) { // Create commands InitializeSessionCommand = new RelayCommand(InitializeSession); EndSessionCommand = new RelayCommand(EndSessionAsync); PauseCommand = new RelayCommand(() => mSessionHandler.Pause()); ResumeCommand = new RelayCommand(() => mSessionHandler.Resume()); FinishTaskCommand = new RelayCommand(FinishTask); // Inject DI mTimeTasksMapper = timeTasksMapper; mUIManager = uiManager; mSessionHandler = sessionHandler; mApplicationViewModel = applicationViewModel; }
/// <summary> /// Default constructor /// </summary> public TasksSummaryPageViewModel( ISessionHandler sessionHandler, TimeTasksMapper tasksMapper, ApplicationViewModel applicationViewModel, IViewModelProvider viewModelProvider) { // Create commands StartTasksCommand = new RelayCommand(StartTaskSession); CancelCommand = new RelayCommand(Cancel); ReorderCommand = new RelayParameterizedCommand(Reorder); // Get injected DI services mSessionHandler = sessionHandler; mTimeTasksMapper = tasksMapper; mApplicationViewModel = applicationViewModel; mViewModelProvider = viewModelProvider; // Load tasks from the manager to this page LoadTaskList(); }