private void AddSRA(string name, bool isPairedEnd) { if (name.Contains("SR") || name.Contains("ER")) { if (SraCollection.Any(s => s.Name == name.Trim())) { MessageBox.Show("That SRA has already been added. Please choose a new SRA accession.", "Workflow", MessageBoxButton.OK, MessageBoxImage.Information); } else { SRADataGrid sraDataGrid = new SRADataGrid(name.Trim(), isPairedEnd); SraCollection.Add(sraDataGrid); } } else if (MessageBox.Show("SRA accessions are expected to start with \"SR\" or \"ER\", such as SRX254398 or ERR315327. View the GEO SRA website?", "Workflow", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.Yes) { Process.Start("https://www.ncbi.nlm.nih.gov/sra"); } }
private void BtnAddSRA_Click(object sender, RoutedEventArgs e) { if (TbxSRA.Text.Contains("SR") || TbxSRA.Text.Contains("ER")) { if (SraCollection.Any(s => s.Name == TbxSRA.Text.Trim())) { MessageBox.Show("That SRA has already been added. Please choose a new SRA accession.", "Workflow", MessageBoxButton.OK, MessageBoxImage.Information); } else { SRADataGrid sraDataGrid = new SRADataGrid(TbxSRA.Text.Trim()); SraCollection.Add(sraDataGrid); } } else if (MessageBox.Show("SRA accessions are expected to start with \"SR\" or \"ER\", such as SRX254398 or ERR315327. View the GEO SRA website?", "Workflow", MessageBoxButton.YesNo, MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.Yes) { Process.Start("https://www.ncbi.nlm.nih.gov/sra"); } }