Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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;
}
}
Comments
- Anonymous
April 21, 2008
PingBack from http://microsoftnews.askpcdoc.com/?p=3639