예제 #1
0
        protected virtual void OnFormShown(object sender, EventArgs e)
        {
            if (_editor != null)
            {
                var posRect = _editor.RectangleToScreen(_editor.ClientRectangle);
                var winSize = this.Size;

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

            var searchBox = this.SearchBox;

            if (searchBox != null)
            {
                searchBox.SelectAll();
                searchBox.Focus();
            }
            else
            {
                if (_editor != null)
                {
                    _editor.Focus();
                }
            }

            this.HighlightAll();

            _isInitialized = true;
        }