Exemple #1
0
        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));
        }
Exemple #2
0
        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));
        }
Exemple #3
0
            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);
                    }
                }
            }
Exemple #4
0
            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);
                    }
                }
            }
Exemple #5
0
            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);
                }
            }
Exemple #6
0
            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);
                }
            }
Exemple #7
0
            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);
                }
            }
Exemple #8
0
 private CellLocator(IEnumerable <RowItemValues> skylineDocNodeValues, RowItemValues replicateValues)
 {
     _skylineDocNodeValues = ImmutableList.ValueOf(skylineDocNodeValues);
     _replicateValues      = replicateValues;
 }