private void SearchBtn_Click(object sender, EventArgs e) { Form f = SearchGrid.FindForm(); if (f.GetType() == typeof(QueryForm)) { QueryForm SearchParent = (QueryForm)f; offset = SearchParent.doConcat(columnList.Text.ToString(), offset, beforeTxt.Text.ToString(), afterTxt.Text.ToString()); } if (f.GetType() == typeof(QueryerForm)) { QueryerForm SearchParent = (QueryerForm)f; offset = SearchParent.doConcat(columnList.Text.ToString(), offset, beforeTxt.Text.ToString(), afterTxt.Text.ToString()); } }
private void SearchForm_KeyDown(object sender, KeyEventArgs e) { if (e.Control && e.KeyCode == Keys.R) { Form f = SearchGrid.FindForm(); if (f.GetType() == typeof(QueryForm)) { QueryForm SearchParent = (QueryForm)f; offset = SearchParent.doConcat(columnList.Text.ToString(), offset, beforeTxt.Text.ToString(), afterTxt.Text.ToString()); } if (f.GetType() == typeof(QueryerForm)) { QueryerForm SearchParent = (QueryerForm)f; offset = SearchParent.doConcat(columnList.Text.ToString(), offset, beforeTxt.Text.ToString(), afterTxt.Text.ToString()); } } if (e.KeyCode == Keys.Escape) { this.DialogResult = DialogResult.OK; this.Close(); } }