Exemplo n.º 1
0
        protected override void OnMouseDown(MouseEventArgs e)
        {
            base.OnMouseDown(e);
            if (!Focused)
            {
                base.Focus();
            }

            if (fNodesDragging)
            {
                fDragged = fSys.GetNearestNode(e.Location.X, e.Location.Y);

                if (fDragged != null)
                {
                    fDragged.Fixed = true;
                }
            }
        }
Exemplo n.º 2
0
        protected override void OnMouseDown(MouseEventArgs e)
        {
            if (!HasFocus)
            {
                base.Focus();
            }

            Point mpt = new Point(e.Location);

            if (fNodesDragging)
            {
                fDragged = fSys.GetNearestNode(mpt.X, mpt.Y);

                if (fDragged != null)
                {
                    fDragged.Fixed = true;
                }
            }

            e.Handled = true;
            base.OnMouseDown(e);
        }