Ejemplo n.º 1
0
        public WorkbookViewModel()
        {
            ShowUncompletedTasks = true;
            ShowCompletedTasks = true;

            _currentGrouping = WorkbookGroupings.NoGrouping;
        }
Ejemplo n.º 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);
        }