Esempio n. 1
0
        protected override void OnDoubleClick(AbsoluteMouseEventArgs e)
        {
            base.OnDoubleClick(e);
            ResizeMode resizeMode = GetResizeMode(e.Location);

            if ((resizeMode & ResizeMode.Right) != 0)
            {
                AutoWidth();
            }
            if ((resizeMode & ResizeMode.Bottom) != 0)
            {
                AutoHeight();
            }
        }
Esempio n. 2
0
        internal sealed override bool DoubleClicked(AbsoluteMouseEventArgs e)
        {
            bool doubleClicked = Contains(e.Location);

            if (e.Button == MouseButtons.Left)
            {
                doubleClicked |= (IsSelected && GetResizeMode(e.Location) != ResizeMode.None);
            }

            if (doubleClicked)
            {
                OnDoubleClick(e);
            }

            return(doubleClicked);
        }
Esempio n. 3
0
        internal sealed override bool MousePressed(AbsoluteMouseEventArgs e)
        {
            bool pressed = Contains(e.Location);

            if (e.Button == MouseButtons.Left)
            {
                pressed |= (IsSelected && GetResizeMode(e.Location) != ResizeMode.None);
            }

            if (pressed)
            {
                OnMouseDown(e);
            }

            return(pressed);
        }
Esempio n. 4
0
        protected override void OnMouseMove(AbsoluteMouseEventArgs e)
        {
            base.OnMouseMove(e);

            if (IsResizing)
            {
                PerformResize(e.Location);
            }
            else if (IsMousePressed && e.Button == MouseButtons.Left)
            {
                Size offset = new Size(
                    (int)(e.X - mouseDownLocation.X),
                    (int)(e.Y - mouseDownLocation.Y));

                OnDragging(new MoveEventArgs(offset));
            }
        }
Esempio n. 5
0
 protected override void OnMouseUp(AbsoluteMouseEventArgs e)
 {
     base.OnMouseUp(e);
     resizeMode = ResizeMode.None;
 }
Esempio n. 6
0
 protected override void OnMouseDown(AbsoluteMouseEventArgs e)
 {
     base.OnMouseDown(e);
     resizeMode = GetResizeMode(e.Location);
 }
Esempio n. 7
0
 internal abstract bool DoubleClicked(AbsoluteMouseEventArgs e);
Esempio n. 8
0
 internal abstract bool MouseUpped(AbsoluteMouseEventArgs e);
Esempio n. 9
0
 internal abstract bool MousePressed(AbsoluteMouseEventArgs e);