public void OnSelectionMade(StatementCompletionItem statementCompletionItem) { if (SelectionMade != null) { SelectionMade.Invoke(statementCompletionItem); } }
void statementCompletionEditBox_SelectionMade(StatementCompletionItem statementCompletionItem) { if (tabControl1.SelectedTab == tabPageProteinList) { _statementCompletionEditBox.TextBox.Text = statementCompletionItem.ProteinInfo.Name; gridViewProteins.EndEdit(); } else if (tabControl1.SelectedTab == tabPagePeptideList) { _statementCompletionEditBox.TextBox.Text = statementCompletionItem.Peptide; if (gridViewPeptides.CurrentRow != null) { gridViewPeptides.CurrentRow.Cells[colPeptideProtein.Index].Value = statementCompletionItem.ProteinInfo.Name; } gridViewPeptides.EndEdit(); } else if (tabControl1.SelectedTab == tabPageTransitionList) { _statementCompletionEditBox.TextBox.Text = statementCompletionItem.Peptide; if (gridViewTransitionList.CurrentRow != null) { gridViewTransitionList.CurrentRow.Cells[colTransitionProteinName.Index].Value = statementCompletionItem.ProteinInfo.Name; } gridViewTransitionList.EndEdit(); } }