public WorkbookViewModel() { ShowUncompletedTasks = true; ShowCompletedTasks = true; _currentGrouping = WorkbookGroupings.NoGrouping; }
public WorkbookViewModel(ITimeManagerRepository timeManagerRepository) { if (timeManagerRepository == null) throw new ArgumentNullException("timeManagerRepository"); this.timeManagerRepository = timeManagerRepository; ShowUncompletedTasks = true; ShowCompletedTasks = true; currentGrouping = WorkbookGroupings.NoGrouping; var tasksViewModel = timeManagerRepository.GetAllTasks() .Select(x => new TaskViewModel(timeManagerRepository, x)).ToList(); tasks = new ListCollectionView(tasksViewModel); }