private static int GetPeakImageIndex(TransitionGroupDocNode nodeGroup, PeptideDocNode nodeParent, SequenceTree sequenceTree) { var settings = sequenceTree.Document.Settings; if (!settings.HasResults) { return(-1); } int index = sequenceTree.GetDisplayResultsIndex(nodeParent); float?ratio = (nodeGroup.HasResults ? nodeGroup.GetPeakCountRatio(index) : null); if (ratio == null) { return((int)SequenceTree.StateImageId.peak_blank); } if (ratio < 0.5) { return((int)SequenceTree.StateImageId.no_peak); } if (ratio < 1.0) { return((int)SequenceTree.StateImageId.keep); } return((int)SequenceTree.StateImageId.peak); }
private static int GetPeakImageIndex(TransitionGroupDocNode nodeGroup, PeptideDocNode nodeParent, SequenceTree sequenceTree) { var settings = sequenceTree.Document.Settings; if (!settings.HasResults) return -1; int index = sequenceTree.GetDisplayResultsIndex(nodeParent); float? ratio = (nodeGroup.HasResults ? nodeGroup.GetPeakCountRatio(index) : null); if (ratio == null) return (int)SequenceTree.StateImageId.peak_blank; if (ratio < 0.5) return (int)SequenceTree.StateImageId.no_peak; if (ratio < 1.0) return (int)SequenceTree.StateImageId.keep; return (int)SequenceTree.StateImageId.peak; }