Ejemplo n.º 1
0
        /// <summary>
        /// Matches library peptides to the current document settings and adds them to the document.
        /// This needs to be one function so that we can use one LongWaitDlg.
        /// </summary>
        public void AddAllPeptidesToDocument(ILongWaitBroker broker, AuditLogEntryCreatorList entryCreators)
        {
            MatchAllPeptides(broker);
            if (broker.IsCanceled)
            {
                return;
            }

            if (MatchedPeptideCount == 0)
            {
                return;
            }

            if (broker.ShowDialog(wnd => EnsureDuplicateProteinFilter(wnd, entryCreators)) == DialogResult.Cancel)
            {
                return;
            }

            IdentityPath selectedPath;
            IdentityPath toPath = AddAllPeptidesSelectedPath;

            DocAllPeptides             = AddPeptides(_document, broker, toPath, out selectedPath);
            AddAllPeptidesSelectedPath = selectedPath;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Matches library peptides to the current document settings and adds them to the document.
        /// This needs to be one function so that we can use one LongWaitDlg. 
        /// </summary>
        public void AddAllPeptidesToDocument(ILongWaitBroker broker)
        {
            MatchAllPeptides(broker);
            if (broker.IsCanceled)
                return;

            if (MatchedPeptideCount == 0)
                return;

            if (broker.ShowDialog(EnsureDuplicateProteinFilter) == DialogResult.Cancel)
                return;

            IdentityPath selectedPath;
            IdentityPath toPath = AddAllPeptidesSelectedPath;

             DocAllPeptides = AddPeptides(_document, broker, toPath, out selectedPath);
            AddAllPeptidesSelectedPath = selectedPath;
        }