Table of Contents

Class NonRealtimeDraggingTool

Namespace
Northwoods.Go.Tools.Extensions
Assembly
NonRealtimeDraggingWinForms.dll

The NonRealtimeDraggingTool class lets the user drag an image instead of actually moving any selected nodes, until the mouse-up event.

public class NonRealtimeDraggingTool : DraggingTool
Inheritance
NonRealtimeDraggingTool
Inherited Members

Properties

Duration

Gets or sets how long the movement animation should be to move the actual parts upon a mouse-up.

public int Duration { get; set; }

Property Value

int

Remarks

The default value is zero -- there is no animation of the movement.

Methods

ComputeEffectiveCollection(IEnumerable<Part>, DraggingOptions)

Call the base method, and then make an image of the returned collection, show it using a Picture, and hold the Picture in a temporary Part.

public override IDictionary<Part, DraggingInfo> ComputeEffectiveCollection(IEnumerable<Part> coll, DraggingOptions options)

Parameters

coll IEnumerable<Part>

an IEnumerable of Parts

options DraggingOptions

Returns

IDictionary<Part, DraggingInfo>

DoActivate()

When activated, replace the DraggedParts with the ghost dragged parts, which consists of just one Part, the image, added to the Diagram at the current mouse point.

public override void DoActivate()

DoDeactivate()

When deactivated, make sure any image is removed from the Diagram and all references are cleared out.

public override void DoDeactivate()

DoKeyDown()

If the user changes to "copying" mode by holding down the Control key, return to the regular behavior and remove the image.

public override void DoKeyDown()

DoKeyUp()

If the user changes back to "moving" mode, show the image again and go back to dragging the ghost dragged parts.

public override void DoKeyUp()

DoMouseUp()

Do the normal mouse-up behavior, but only after restoring DraggedParts.

public override void DoMouseUp()