/// <summary>
 /// Initializes a new instance of the <see cref="BrowseLabels"/> class.
 /// </summary>
 /// <param name="tfsUrl">The TFS URL.</param>
 public BrowseSolutions(string tfsUrl, LabelSearchCriteria searchCriteria)
 {
     this.tfsUrl = tfsUrl;
     this.InitializeComponent();
     this.btnSelectLabel.Enabled = false;
     this.ValidSearchCriteria = searchCriteria;
     this.txtLabelFilter.Text = searchCriteria.LabelName;
     this.txtOwnerFilter.Text = searchCriteria.OwnerName;
 }
 /// <summary>
 /// Gets the selected criteria.
 /// </summary>
 private void GetSelectedCriteria()
 {
     this.ValidSearchCriteria = new LabelSearchCriteria
     {
         LabelName = this.gdvTFSLabels.SelectedRows[0].Cells[0].Value.ToString(),
         OwnerName = this.gdvTFSLabels.SelectedRows[0].Cells[1].Value.ToString()
     };
 }
 /// <summary>
 /// Handles the Click event of the btnFind control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 private void BtnFind_Click(object sender, EventArgs e)
 {
     LabelSearchCriteria criteria = new LabelSearchCriteria
     {
         LabelName = txtLabelFilter.Text,
         OwnerName = txtOwnerFilter.Text
     };
     backgroundWorker1.RunWorkerAsync(criteria);
 }