Exemple #1
0
 private void ExportList(IEnumerable <IWorkItemSummary> itemList)
 {
     if (itemList != null && itemList.Count() > 0)
     {
         FolderBrowserDialog dialog = new FolderBrowserDialog();
         dialog.Description = "Choose where to save work items summary";
         if (dialog.ShowDialog() == DialogResult.OK)
         {
             try
             {
                 NetworkCredential credentials = new NetworkCredential(userTextBox.Text.Trim(), passwordTextBox.Text, domainTextBox.Text);
                 HTMLPagesCreationHelper.SaveItemsSummary(itemList, dialog.SelectedPath, Environment.CurrentDirectory, credentials);
                 MessageBox.Show("Saving completed");
             }
             catch (Exception ex)
             {
                 MessageBox.Show("Something went wrong!. Here is the exception details: " + ex.Message);
             }
         }
     }
     else
     {
         MessageBox.Show("No items were retrieved! Please double check the tfs url, query text, or work item id.");
     }
 }
 private void ExportList(IEnumerable <IWorkItemSummary> itemList)
 {
     if (itemList != null && itemList.Count() > 0)
     {
         var downloadPath = filePath.Text;
         if (!string.IsNullOrEmpty(downloadPath))
         {
             NetworkCredential cred = new NetworkCredential(userTextBox.Text.Trim(), passwordTextBox.Text, domainTextBox.Text);
             extractor.Credentials = cred;
             HTMLPagesCreationHelper.SaveItemsSummary(itemList, downloadPath, Environment.CurrentDirectory, cred);
             MessageBox.Show("Saving completed");
         }
         else
         {
             MessageBox.Show("Download path not provided");
         }
     }
     else
     {
         MessageBox.Show("No items were retrieved! Please double check the tfs url, query text, or work item id.");
     }
 }