Example #1
0
        private IEnumerable <MyWorkItem> GetWorkItems(TfsQuery query)
        {
            var context = new Dictionary <string, string> {
                { "project", query.Query.Project.Name }
            };

            return((from WorkItem workItem in workItemStore.Query(query.Query.QueryText, context)
                    select new MyWorkItem(workItem.Id, workItem.State, workItem.Title, workItem.Type.Name)
                    ).ToList());
        }
        private IEnumerable <MyWorkItem> GetWorkItems(TfsQuery query)
        {
            var items = new List <MyWorkItem>();

            RecurseWorkItems(
                new Dictionary <string, string> {
                { "project", query.Query.Project.Name },
                { "currentIteration", query.CurrentIteration }
            }, items, query.Query);

            return(items);
        }
Example #3
0
        private void PopulateWorkItemsList(ListView listView, TfsQuery query)
        {
            listView.Items.Clear();
            IEnumerable <MyWorkItem> workItems = GetWorkItems(query);

            foreach (var workItem in workItems)
            {
                var lvi = new ListViewItem {
                    Text = "", Tag = workItem,
                };
                lvi.SubItems.Add(workItem.type);
                lvi.SubItems.Add(workItem.id.ToString());
                lvi.SubItems.Add(workItem.state);
                lvi.SubItems.Add(workItem.title);
                listView.Items.Add(lvi);
            }
            foreach (ColumnHeader column in listViewIssues.Columns)
            {
                column.Width = -1;
            }
        }
        private void PopulateWorkItemsList(ListView listView, TfsQuery tfsQuery)
        {
            listView.Items.Clear();
            IEnumerable <MyWorkItem> myWorkItems = GetWorkItems(tfsQuery);

            foreach (var myWorkItem in myWorkItems)
            {
                var lvi = new ListViewItem
                {
                    Text = "",
                    Tag  = myWorkItem,
                    UseItemStyleForSubItems = !options.VisualStudioOnline
                };

                lvi.SubItems.Add(myWorkItem.type);
                if (!options.VisualStudioOnline)
                {
                    lvi.SubItems.Add(myWorkItem.id.ToString());
                }
                else
                {
                    lvi.SubItems.Add(new ListViewItem.ListViewSubItem
                    {
                        Text      = myWorkItem.id.ToString(),
                        Font      = new Font(lvi.Font, FontStyle.Underline),
                        ForeColor = Color.Blue
                    });
                }
                lvi.SubItems.Add(myWorkItem.state);
                lvi.SubItems.Add(myWorkItem.title);
                listView.Items.Add(lvi);
            }
            foreach (ColumnHeader column in listViewIssues.Columns)
            {
                column.Width = -1;
            }
        }
Example #5
0
 private IEnumerable<MyWorkItem> GetWorkItems(TfsQuery query)
 {
     var context = new Dictionary<string, string> {{"project", query.Query.Project.Name}};
     return (from WorkItem workItem in workItemStore.Query(query.Query.QueryText, context)
             select new MyWorkItem(workItem.Id, workItem.State, workItem.Title, workItem.Type.Name)
             ).ToList();
 }
Example #6
0
 private void PopulateWorkItemsList(ListView listView, TfsQuery query)
 {
     listView.Items.Clear();
     IEnumerable<MyWorkItem> workItems = GetWorkItems(query);
     foreach (var workItem in workItems)
     {
         var lvi = new ListViewItem {Text = "", Tag = workItem,};
         lvi.SubItems.Add(workItem.type);
         lvi.SubItems.Add(workItem.id.ToString());
         lvi.SubItems.Add(workItem.state);
         lvi.SubItems.Add(workItem.title);
         listView.Items.Add(lvi);
     }
     foreach (ColumnHeader column in listViewIssues.Columns) column.Width = -1;
 }
Example #7
0
        private void PopulateWorkItemsList(ListView listView, TfsQuery tfsQuery)
        {
            listView.Items.Clear();
            IEnumerable<MyWorkItem> myWorkItems = GetWorkItems(tfsQuery);
            foreach (var myWorkItem in myWorkItems)
            {
                var lvi = new ListViewItem
                {
                    Text = "",
                    Tag = myWorkItem,
                    UseItemStyleForSubItems = !options.VisualStudioOnline
                };

                lvi.SubItems.Add(myWorkItem.type);
                if (!options.VisualStudioOnline)
                {
                    lvi.SubItems.Add(myWorkItem.id.ToString());
                }
                else
                {
                    lvi.SubItems.Add(new ListViewItem.ListViewSubItem
                    {
                        Text = myWorkItem.id.ToString(),
                        Font = new Font(lvi.Font, FontStyle.Underline),
                        ForeColor = Color.Blue
                    });
                }
                lvi.SubItems.Add(myWorkItem.state);
                lvi.SubItems.Add(myWorkItem.title);
                listView.Items.Add(lvi);
            }
            foreach (ColumnHeader column in listViewIssues.Columns) column.Width = -1;
        }
Example #8
0
        private IEnumerable<MyWorkItem> GetWorkItems(TfsQuery query)
        {
            var items = new List<MyWorkItem>();

            RecurseWorkItems(
                new Dictionary<string, string> {{"project", query.Query.Project.Name}},
                items, query.Query);

            return items;
        }