/// <summary> /// generate report and change selected table names based on # decoy communities /// </summary> public void update_figures_of_merit() { rtb_proteoformFamilyResults.Text = ResultsSummaryGenerator.proteoform_families_report(); int selection = cmbx_tableSelector.SelectedIndex; cmbx_tableSelector.Items.Clear(); cmbx_tableSelector.Items.AddRange(table_names); cmbx_tableSelector.Items.AddRange(Enumerable.Range(0, Sweet.lollipop.decoy_proteoform_communities.Count).Select(i => "Decoy Community " + i).ToArray()); cmbx_tableSelector.SelectedIndex = selection < cmbx_tableSelector.Items.Count ? selection : 0; }
public void update_figures_of_merit() { rtb_proteoformFamilyResults.Text = ResultsSummaryGenerator.proteoform_families_report(); //change selected table names based on # decoy communities int decoy_communities = SaveState.lollipop.decoy_proteoform_communities.Count; for (int i = 0; i < decoy_communities; i++) { if (!cmbx_tableSelector.Items.Contains("Decoy Community " + i)) { cmbx_tableSelector.Items.Add("Decoy Community " + i); } } //if more items than decoy databases, remove later ones //FIX while (cmbx_tableSelector.Items.Count - 5 - decoy_communities > 0) { cmbx_tableSelector.Items.RemoveAt(5 + decoy_communities); } }