示例#1
0
        /// <summary>
        /// Indicates a peak has been picked at a specified retention time
        /// for a specific replicate of a specific <see cref="TransitionGroupDocNode"/>.
        /// </summary>
        /// <param name="peakBoundDragInfos"></param>
        private void FireChangedPeakBounds(IEnumerable<PeakBoundsDragInfo> peakBoundDragInfos)
        {
            if (ChangedPeakBounds != null)
            {
                var filePath = FilePath;
                if (filePath == null)
                    return;

                var listChanges = new List<ChangedPeakBoundsEventArgs>();
                foreach (var dragInfo in peakBoundDragInfos)
                {
                    TransitionGroupDocNode nodeGroup = dragInfo.GraphItem.TransitionGroupNode;
                    TransitionDocNode nodeTran = null;
                    // If editing a single transition, then add the ID to the event
                    if (IsSingleTransitionDisplay && CurveCount == 1)
                        nodeTran = dragInfo.GraphItem.TransitionNode;

                    int iGroup =
                        _nodeGroups.IndexOf(node => ReferenceEquals(node.TransitionGroup, nodeGroup.TransitionGroup));
                    // If node no longer exists, give up
                    if (iGroup == -1)
                        return;

                    var identified = dragInfo.IsIdentified
                                         ? (dragInfo.IsAlignedTimes
                                                ? PeakIdentification.ALIGNED
                                                : PeakIdentification.TRUE)
                                         : PeakIdentification.FALSE;

                    var e = new ChangedPeakBoundsEventArgs(_groupPaths[iGroup],
                                                           nodeTran != null ? nodeTran.Transition : null,
                                                           _nameChromatogramSet,
                                                           // All active groups should have the same file
                                                           filePath,
                                                           dragInfo.StartTime,
                                                           dragInfo.EndTime,
                                                           identified,
                                                           dragInfo.ChangeType);
                    listChanges.Add(e);
                }
                ChangedPeakBounds(this, new ChangedMultiPeakBoundsEventArgs(listChanges.ToArray()));
            }
        }
示例#2
0
 public ChangedMultiPeakBoundsEventArgs(ChangedPeakBoundsEventArgs[] changes)
 {
     Changes = changes;
 }