Пример #1
0
        private void ExecutePrintBacklogItemAndChildren(object sender, ExecutedRoutedEventArgs e)
        {
            IBacklogChildren backlogChildren = ViewModel.TaskboardService.GetBacklogFromWorkItem(ViewModel.SelectedWorkItem);

            if (backlogChildren != null)
            {
                ViewModel.Print(backlogChildren);
            }
        }
Пример #2
0
        public void Print(IBacklogChildren backLogChildren)
        {
            // print Backlog WI and all its child WIs
            List <WorkItem> workItemList = new List <WorkItem>();

            // insert backlog WI into list
            workItemList.Add(backLogChildren.Backlog);

            // insert backlog child WIs which are visible in grid
            foreach (var state in backLogChildren.States)
            {
                var workItems = backLogChildren.Children.Where(c => state.WorkItemStates.Contains(c.State));
                foreach (var item in workItems)
                {
                    workItemList.Add(item);
                }
            }

            // print all WorkItems in list
            PrintWorkItems(workItemList);
        }