Exemplo n.º 1
0
        private void searchToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var dgv = contextMenu.SourceControl as DataGridView ?? dgvCurrent;

            if (frmSearch == null || frmSearch.IsDisposed)
            {
                frmSearch = new FrmSearch
                {
                    SearchSource = dgv
                };
                frmSearch.SearchRequested += new EventHandler <SearchEventArgs>(frmFind_SearchRequested);
            }

            frmSearch.Show();
            frmSearch.Focus();
        }
Exemplo n.º 2
0
        private void searchToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var dgv = contextMenu.SourceControl as DataGridView ?? dgvCurrent;

            if (frmSearch == null || frmSearch.IsDisposed)
            {
                frmSearch = new FrmSearch
                {
                    SearchSource = dgv
                };
                frmSearch.SearchRequested += new EventHandler<SearchEventArgs>(frmFind_SearchRequested);
            }

            frmSearch.Show();
            frmSearch.Focus();
        }