Пример #1
0
 private void SearchForm_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Control && e.KeyCode == Keys.R)
     {
         searchColumns = searchColumns.Clear();
         foreach (object col in columnBox.CheckedItems)
         {
             searchColumns = searchColumns.AddItemToArray(col.ToString());
         }
         Form f = FilterGrid.FindForm();
         if (f.GetType() == typeof(QueryForm))
         {
             QueryForm FilterParent = (QueryForm)f;
             offset = FilterParent.doAutocase(caseBox.Text, offset, searchColumns);
         }
         if (f.GetType() == typeof(QueryerForm))
         {
             QueryerForm FilterParent = (QueryerForm)f;
             offset = FilterParent.doAutocase(caseBox.Text, offset, searchColumns);
         }
     }
     if (e.KeyCode == Keys.Escape)
     {
         this.DialogResult = DialogResult.OK;
         this.Close();
     }
 }
Пример #2
0
        private void SearchBtn_Click(object sender, EventArgs e)
        {
            searchColumns = searchColumns.Clear();
            foreach (object col in columnBox.CheckedItems)
            {
                searchColumns = searchColumns.AddItemToArray(col.ToString());
            }
            Form f = FilterGrid.FindForm();

            if (f.GetType() == typeof(QueryForm))
            {
                QueryForm FilterParent = (QueryForm)f;
                offset = FilterParent.doAutocase(caseBox.Text, offset, searchColumns);
            }
            if (f.GetType() == typeof(QueryerForm))
            {
                QueryerForm FilterParent = (QueryerForm)f;
                offset = FilterParent.doAutocase(caseBox.Text, offset, searchColumns);
            }
        }