DCSIMG
TFS API Part 1: Domain Picker - Shai Raiten's Blog

Shai Raiten's Blog

It's all about code...

TFS API Part 1: Domain Picker

TFS API Part 1: Domain Picker

When creating application for TFS the first thing you need to do is connect to TFS.
There is couple of ways to do that, in this post I’ll show how to connect TFS using DomainPicker.

First add reference for Microsoft.TeamFoundation,Microsoft.TeamFoundation.Client
located in - C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\

Add using for Proxy and Server.

Download Demo Project

using Microsoft.TeamFoundation.Proxy;

using Microsoft.TeamFoundation.Server;

DomainProjectPicker dp = new DomainProjectPicker();

 

DomainProjectPicker constructor can contain DomainProjectPickerMode Enumeration.

#DomainProjectPickerMode

DomainProjectPickerMode.AllowMultiSelect;

DomainProjectPickerMode.AllowProjectSelect;//Requires AllowMultiSelect

DomainProjectPickerMode.DisableServerSelect;//Must provide SelectedServer

image

 

DomainProjectPickerMode.ForwardWndMsgOutsideVS;

DomainProjectPickerMode.None;

#

 

dp.ShowDialog();

 

image

 

After selecting TFS server and the desire project you can take those projects with ProjectInfo

if (dp.SelectedServer != null)

{

    ProjectInfo[] projects = dp.SelectedProjects;

    list_projects.DataSource = projects;

}

 

image

Download Demo Project

Comments

Shai Raiten said:

TFS API Part 2: Domain Picker By Registered Servers (Cache) In my previous post about TFS API Part 1

# January 12, 2009 11:45 PM

DotNetKicks.com said:

You've been kicked (a good thing) - Trackback from DotNetKicks.com

# January 12, 2009 11:49 PM

TFS API Part 1: Domain Picker - Shai Raiten | usproxylist.com said:

Pingback from  TFS API Part 1: Domain Picker - Shai Raiten | usproxylist.com

# January 13, 2009 9:05 AM

TFS API Part 1: Domain Picker - Shai Raiten | cheapdirtdomain.com said:

Pingback from  TFS API Part 1: Domain Picker - Shai Raiten | cheapdirtdomain.com

# January 13, 2009 9:13 AM

Shai Raiten said:

TFS API Part 3: Get Project List Using ICommonStructureService In the first post about TFS API Part 1

# January 13, 2009 9:10 PM

Shai Raiten said:

TFS API Part 5: WorkItemStore - Get Project Details (WorkItemTypes, Queries) In TFS API Part 3: Get Project

# January 16, 2009 12:51 AM

Shai Raiten said:

TFS API Part 6: WorkItemStore - Get Fields From WorkItemType In TFS API Part 5: WorkItemStore - Get Project

# January 19, 2009 10:34 AM

Shai Raiten said:

TFS API Part 7: Use IEventService To Get User Event Subscriptions Over the previous posts I talked about

# January 21, 2009 12:12 AM

Shai Raiten said:

TFS API Part 13: More About Connecting TFS (Custom Credentials, Prompt) I got many request regarding

# February 10, 2009 5:41 PM

Shai Raiten said:

TFS API Summary & My #200 Post It’s been 4 months, 3 weeks(143 days) since my ..::: My #100 Post

# February 13, 2009 11:44 PM

Shai Raiten said:

TFS API Part 20: Bye TeamFoundationServer and Welcome TfsTeamProjectCollection In my last post I talked

# February 11, 2010 3:37 PM

Used Rav4 2007 Toyota Camry Solara, Toyota Rav4 Change - 159.akemet.com said:

Pingback from  Used Rav4 2007 Toyota Camry Solara, Toyota Rav4 Change - 159.akemet.com

# May 24, 2010 3:26 PM

Amazon Lx470 Classifieds Lexus Rx350, Rx350 Radiator Lexus Ls400 - 444.luna-atra.net said:

Pingback from  Amazon Lx470 Classifieds Lexus Rx350, Rx350 Radiator Lexus Ls400 - 444.luna-atra.net

# May 24, 2010 4:05 PM

Shai Raiten said:

Since 2009 I ‘m writing about TFS API and several people asked to get an index page with all parts related

# May 18, 2011 12:03 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 


Enter the numbers above: