示例#1
0
            protected override void OnMouseDown(int x, int y, MouseButtonType button)
            {
                if (button == MouseButtonType.Left)
                {
                    if (IsEditable)
                    {
                        SetKeyboardFocus();
                    }

                    if (!NoSelection)
                    {
                        _leftWasDown = true;
                    }

                    if (_focusPage >= 0 && _focusPage < _pageCoords.GetLength(0))
                    {
                        if (_focusPage % 2 == 0)
                        {
                            x -= RIGHT_X + _gump.X;
                        }
                        else
                        {
                            x -= LEFT_X + _gump.X;
                        }

                        y += _pageCoords[_focusPage, 0] - (UPPER_MARGIN + _gump.Y);
                    }

                    Stb.Click(x, y);
                    UpdateCaretScreenPosition();
                    _caretPage = GetCaretPage();
                }
            }