Represents a marquee that might be dragged with the mouse.
Create an instance of this class when an empty area of the graph is clicked. When the mouse is moved, check to determine whether the mouse has moved far enough to begin a marquee drag. If returns true, call to create a Visual to represent the dragged marquee.
Inheritance: MouseDragWithVisual
Ejemplo n.º 1
0
    OnMouseDownLeftVertexNotClicked
    (
        Point oMouseLocation
    )
    {
        AssertValid();

        m_oDoubleClickedVertexInfo = null;

        // When a control key is pressed, the selected state of the marqueed
        // vertices should be inverted.

        if ( m_eMouseMode == MouseMode.Select && !ControlKeyIsPressed() )
        {
            DeselectAll();
        }

        if (this.Graph.Vertices.Count > 0)
        {
            // The user might want to drag a marquee.  Save the mouse location
            // for use within the MouseMove event.

            m_oMarqueeBeingDragged = new DraggedMarquee(oMouseLocation,
                this.GraphRectangle, m_oLayout.Margin);

            this.Cursor = GetCursorForMarqueeDrag();
            Mouse.Capture(this);
        }
    }