Welcome to MSDN Blogs Sign in | Join | Help

Connect with Team Project using DomainProjectPicker dialog control

One of the most common public controls provided by TFS API’s is the DomainProjectPicker within the namespace Microsoft.TeamFoundation.Proxy. This dialog class allows the user to select the team project to connect to. Code snippet for using this control is as follows,

 

 

DomainProjectPicker dpp = new DomainProjectPicker(DomainProjectPickerMode.None);

if (dpp.ShowDialog() == DialogResult.OK)

{

    try

    {

        Cursor.Current = Cursors.WaitCursor;

        tfsServer = new TeamFoundationServer(dpp.SelectedServer.Name, new UICredentialsProvider());

        tfsServer.Authenticate();

 

        //Connect to VersionControlServer, BuildStore or WorkItemStore.

 

    }

    catch (Exception ex)

    {

        //Exception handling

 

    }

    finally

    {

        Cursor.Current = Cursors.Default;

    }

}

Published Tuesday, April 22, 2008 7:36 AM by manish_mgsi
Filed under: ,

Comments

# Microsoft news and tips » Connect with Team Project using DomainProjectPicker dialog control

Anonymous comments are disabled
 
Page view tracker