private void InitializeViewSources()
        {
            listsViewSource        = new CollectionViewSource();
            listsViewSource.Source = lists;

            tasksViewSource        = new CollectionViewSource();
            tasksViewSource.Source = tasks;
            SortDescriptions.SetSortDescription(tasksViewSource.SortDescriptions, SortDescriptions.TaskItemsOrder);

            quickListSource        = new CollectionViewSource();
            quickListSource.Source = quickList;
        }
Esempio n. 2
0
        public TaskItemViewModel(TaskItem item)
        {
            data = item;

            //Create children view models
            CreateChildrenViewModels();

            //Set Children SortDescription
            childrenViewSource        = new CollectionViewSource();
            childrenViewSource.Source = children;
            SortDescriptions.SetSortDescription(childrenViewSource.SortDescriptions, SortDescriptions.TaskItemsOrder);
        }
Esempio n. 3
0
        private int?currentTaskId;  //Prevent circular reference

        public ParentSelectWindowViewModel(int listId, int?currentTaskId, Window window)
        {
            this.window        = window;
            this.currentTaskId = currentTaskId;

            Cancelled = true;

            viewsource        = new CollectionViewSource();
            viewsource.Source = tasks;
            SortDescriptions.SetSortDescription(viewsource.SortDescriptions, SortDescriptions.TaskItemsOrder);

            Workspace.API.LoadList(listId, tasks, currentTaskId);
        }