public WorkbookViewModel()
        {
            ShowUncompletedTasks = true;
            ShowCompletedTasks = true;

            _currentGrouping = WorkbookGroupings.NoGrouping;
        }
예제 #2
0
        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);
        }