Exemplo n.º 1
0
        protected override void OnMouseUp(MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                mdown = false;
            }
            else if (e.Button == MouseButtons.Right)
            {
                currentContext = this;
                contextMenu.Show(this, e.Location);
            }
            chatControl?.CloseAutocomplete();

            base.OnMouseUp(e);
        }
Exemplo n.º 2
0
        protected override void OnMouseDown(MouseEventArgs e)
        {
            var g = App.UseDirectX ? null : CreateGraphics();

            if (e.Button == MouseButtons.Left)
            {
                mdown = true;

                if (Logic.Message != null)
                {
                    Logic.SetSelectionEnd(Logic.SelectionStart = getIndexFromMessagePosition(Logic.Message.MessagePositionAtPoint(g, new CommonPoint(e.X - messagePadding.Left, e.Y - messagePadding.Top), 0)));
                }
            }

            g?.Dispose();

            chatControl.Focus();
            chatControl.CloseAutocomplete();

            base.OnMouseDown(e);
        }