Пример #1
0
        private void DataGridViewOnRowHeaderMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            var row             = dataGridView.Rows[e.RowIndex];
            var peptideAnalysis = (PeptideFileAnalysis)row.Tag;

            PeptideFileAnalysisFrame.ActivatePeptideDataForm <AbstractChromatogramForm>(this, peptideAnalysis);
        }
Пример #2
0
        private void ShowPeptideFileAnalysisForm <T>(long peptideFileAnalysisId) where T : PeptideFileAnalysisForm
        {
            var frame = PeptideFileAnalysisFrame.ShowPeptideFileAnalysis(Workspace, peptideFileAnalysisId);

            if (frame != null)
            {
                frame.ShowForm <T>();
            }
        }
Пример #3
0
        private void DataGridView1OnCellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex < 0 || e.ColumnIndex < 0)
            {
                return;
            }
            var row = dataGridView1.Rows[e.RowIndex];

            if (e.ColumnIndex == colPeptide.Index)
            {
                var peptideFileAnalysis = (PeptideFileAnalysis)row.Tag;
                PeptideFileAnalysisFrame.ShowFileAnalysisForm <TracerChromatogramForm>(peptideFileAnalysis);
            }
        }
Пример #4
0
        public static PeptideFileAnalysisFrame ActivatePeptideDataForm <T>(Form sibling, PeptideFileAnalysis peptideFileAnalysis) where T : PeptideFileAnalysisForm
        {
            PeptideFileAnalysisFrame peptideFileAnalysisFrame = null;

            foreach (var form in Application.OpenForms)
            {
                if (!(form is PeptideFileAnalysisFrame))
                {
                    continue;
                }

                if (((PeptideFileAnalysisFrame)form).PeptideFileAnalysis != peptideFileAnalysis)
                {
                    continue;
                }
                peptideFileAnalysisFrame = (PeptideFileAnalysisFrame)form;
                break;
            }
            if (peptideFileAnalysisFrame == null)
            {
                peptideFileAnalysisFrame = new PeptideFileAnalysisFrame(peptideFileAnalysis);
                if (sibling is DockableForm)
                {
                    DockableForm dockableSibling = (DockableForm)sibling;
                    if (dockableSibling.DockPanel != null)
                    {
                        peptideFileAnalysisFrame.Show(dockableSibling.DockPanel, dockableSibling.DockState);
                    }
                }
                else
                {
                    if (sibling != null)
                    {
                        peptideFileAnalysisFrame.Show(sibling.Parent);
                    }
                    else
                    {
                        peptideFileAnalysisFrame.Show(null);
                    }
                }
            }
            peptideFileAnalysisFrame.ShowForm <T>();
            return(peptideFileAnalysisFrame);
        }
Пример #5
0
        private void DataGridViewOnCellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex < 0 || e.RowIndex < 0)
            {
                return;
            }
            var row = dataGridView.Rows[e.RowIndex];
            var peptideFileAnalysis = (PeptideFileAnalysis)row.Tag;
            var column = dataGridView.Columns[e.ColumnIndex];

            if (e.ColumnIndex >= 0)
            {
                column = dataGridView.Columns[e.ColumnIndex];
            }
            if (column == colPeakStart || column == colPeakEnd)
            {
                PeptideFileAnalysisFrame.ActivatePeptideDataForm <AbstractChromatogramForm>(this, peptideFileAnalysis);
            }
            else if (column == colTracerPercent || column == colScore)
            {
                PeptideFileAnalysisFrame.ActivatePeptideDataForm <TracerChromatogramForm>(this, peptideFileAnalysis);
            }
        }