Beispiel #1
0
        private void btnNextSearch_Click(object sender, EventArgs e)
        {
            string searchText = txtSearchText.Text.Trim();

            textSearchResult = DocumentViewer1.FindNext(searchText, lastSearchResult: textSearchResult, searchOptions: textSearchOptions);
            ShowSearchedTextNotFound(textSearchResult);
        }
Beispiel #2
0
 private void txtSearchText_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == System.Windows.Forms.Keys.Enter)
     {
         string searchText = txtSearchText.Text.Trim();
         textSearchResult = DocumentViewer1.FindNext(searchText, lastSearchResult: textSearchResult, searchOptions: textSearchOptions);
         ShowSearchedTextNotFound(textSearchResult);
         e.Handled          = true;
         e.SuppressKeyPress = true;
     }
 }