private void CbxServerName_SelectedIndexChanged(object sender, EventArgs e)
{
try
{
this.btnLoadTFSlabel.Enabled = this.cbxServerName.SelectedIndex > -1;
if (cbxServerName.SelectedValue != null)
{
txtTFSDefaultCollection.Text = Convert.ToString(cbxServerName.SelectedValue);
this.selectedtfsConnectionString = this.cbxServerName.Text.GetTFSConnectionString();
if (this.selectedtfsConnectionString == null)
{
throw new NullReferenceException("Cannot find TFS settings for given server name.");
}
}
}
catch (NullReferenceException exception)
{
exception.ShowUIException();
}
}