Example #1
0
        private void OnClickFind(object sender, EventArgs e)
        {
            if (_replacePanel != null && !_replacePanel.IsDisposed)
            {
                _replacePanel.Hide();
            }

            if (_searchPanel == null || _searchPanel.IsDisposed)
            {
                _searchPanel       = new SearchForm();
                _searchPanel.Owner = this;
            }

            var posRect = textEditor.RectangleToScreen(textEditor.ClientRectangle);
            var winSize = _searchPanel.Size;

            _searchPanel.Left = posRect.Right - winSize.Width - SearchGlobals.Offset * 4;
            _searchPanel.Top  = posRect.Top + SearchGlobals.Offset;


            Action <string, bool, bool> searchListener = this.SearchTextChanged;

            _searchPanel.SearchText       = tbbTextBoxFind.Text;
            _searchPanel.IsMatchCase      = _isMatchCase;
            _searchPanel.IsMatchWholeWord = _isMatchWholeWord;

            _searchPanel.Show(_mainForm, textEditor, searchListener, false);
        }