public static CellLocator ForRow(ICollection <DataPropertyDescriptor> rowHeaders) { var docNodeValues = ListDocNodeTypes().Select(type => RowItemValues.FromItemProperties(type, rowHeaders)) .Where(v => !v.IsEmpty).ToList(); var replicateValue = RowItemValues.FromItemProperties(typeof(IReplicateValue), rowHeaders); return(new CellLocator(docNodeValues, replicateValue)); }
public static CellLocator ForColumn(ICollection <DataPropertyDescriptor> columnHeaders, ICollection <DataPropertyDescriptor> otherPropertyDescriptors) { var docNodeValues = ListDocNodeTypes().Select(type => RowItemValues.ForColumn(type, columnHeaders, otherPropertyDescriptors)) .Where(v => !v.IsEmpty).ToList(); var replicateValue = RowItemValues.ForColumn(typeof(IReplicateValue), columnHeaders, otherPropertyDescriptors); return(new CellLocator(docNodeValues, replicateValue)); }
public override IEnumerable <Result> GetSelectedResults(BoundDataGridView dataGridView) { var rowItemValues = RowItemValues.FromDataGridView(typeof(TransitionResult), dataGridView); foreach (var rowItem in rowItemValues.GetSelectedRowItems(dataGridView)) { foreach (var result in rowItemValues.GetRowValues(rowItem).Cast <Result>()) { yield return(result); } } }
public override IEnumerable <SkylineDocNode> GetSelectedNodes(BoundDataGridView dataGridView) { var rowItemValues = RowItemValues.FromDataGridView(typeof(Entities.Transition), dataGridView); foreach (var rowItem in rowItemValues.GetSelectedRowItems(dataGridView)) { foreach (var transition in rowItemValues.GetRowValues(rowItem).Cast <Entities.Transition>()) { yield return(transition); } } }
public override IEnumerable <Result> GetSelectedResults(BoundDataGridView dataGridView) { var rowItemValues = RowItemValues.FromDataGridView(typeof(PeptideResult), dataGridView); foreach (var rowItem in rowItemValues.GetSelectedRowItems(dataGridView)) { foreach (var result in rowItemValues.GetRowValues(rowItem).Cast <Result>()) { yield return(result); } } foreach (var precursorResult in Precursors.GetSelectedResults(dataGridView)) { yield return(((PrecursorResult)precursorResult).PeptideResult); } }
public override IEnumerable <SkylineDocNode> GetSelectedNodes(BoundDataGridView dataGridView) { var rowItemValues = RowItemValues.FromDataGridView(typeof(Protein), dataGridView); foreach (var rowItem in rowItemValues.GetSelectedRowItems(dataGridView)) { foreach (var protein in rowItemValues.GetRowValues(rowItem).Cast <Protein>()) { yield return(protein); } } foreach (var peptide in Peptides.GetSelectedNodes(dataGridView)) { yield return(((Entities.Peptide)peptide).Protein); } }
public override IEnumerable <SkylineDocNode> GetSelectedNodes(BoundDataGridView dataGridView) { var rowItemValues = RowItemValues.FromDataGridView(typeof(Entities.Peptide), dataGridView); foreach (var rowItem in rowItemValues.GetSelectedRowItems(dataGridView)) { foreach (var precursor in rowItemValues.GetRowValues(rowItem).Cast <Entities.Peptide>()) { yield return(precursor); } } foreach (var precursor in Precursors.GetSelectedNodes(dataGridView)) { yield return(((Precursor)precursor).Peptide); } }
private CellLocator(IEnumerable <RowItemValues> skylineDocNodeValues, RowItemValues replicateValues) { _skylineDocNodeValues = ImmutableList.ValueOf(skylineDocNodeValues); _replicateValues = replicateValues; }