C# Класс MapAround.UI.WinForms.GeometryEditor

Represents a geometry editor.
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
drawActiveNode void
drawNodes void
insertNodeAt void
recalcActiveElements void
removeNodeAt void

Открытые методы

Метод Описание
ClearHistory ( ) : void

Clears the history of edit operations.

DrawEditingGeometry ( Graphics g, MapToClientDelegate mapToClient, int offsetX, int offsetY ) : void

Draws editing geometry.

GetSecondaryNodes ( ) : IEnumerable

Gets secondaty nodes of the editing feature. Secondary nodes are nodes placed at the middle points of the feature segments.

InsertPatch ( int patchIndex, IEnumerable coordinates ) : void

Inserts a new coordinate patch into the editing geometry.

Redo ( ) : void

Redo edit action.

RemoveActiveNode ( ) : void

Removes the active node.

RemoveActivePatch ( ) : void

Removes the active patch.

RemovePatch ( int patchIndex ) : void

Removes specified coordinate patch.

ReplaceGeometry ( IGeometry newGeometry ) : void

Replaces currently editing geometry with the other one.

TryActivateNodeAt ( ICoordinate coordinate, double nodeSize ) : bool

Tries to activate a node at the specified position.

TryAddNode ( ICoordinate coordinate ) : bool

Tries to add a new node into editing geometry.

Undo ( ) : void

Undo edit action.

UpdateActiveNodePosition ( ICoordinate coordinate, bool commitIntoUndoList ) : bool

Updates the position of the active node with the specified value

Приватные методы

Метод Описание
drawActiveNode ( Graphics g, MapToClientDelegate MapToClient, Color color, int offsetX, int offsetY ) : void
drawNodes ( IEnumerable nodes, Graphics g, MapToClientDelegate MapToClient, Color color, int offsetX, int offsetY ) : void
insertNodeAt ( int patchIndex, int coordinateIndex, ICoordinate coordinate ) : void
recalcActiveElements ( ) : void
removeNodeAt ( int patchIndex, int coordinateIndex ) : void

Описание методов

ClearHistory() публичный Метод

Clears the history of edit operations.
public ClearHistory ( ) : void
Результат void

DrawEditingGeometry() публичный Метод

Draws editing geometry.
public DrawEditingGeometry ( Graphics g, MapToClientDelegate mapToClient, int offsetX, int offsetY ) : void
g System.Drawing.Graphics A System.Drawing.Graphics instance where to draw the geometry
mapToClient MapToClientDelegate A method performing map-to-screen conversion
offsetX int An X offset of geometry in pixels
offsetY int A Y offset of geometry in pixels
Результат void

GetSecondaryNodes() публичный Метод

Gets secondaty nodes of the editing feature. Secondary nodes are nodes placed at the middle points of the feature segments.
public GetSecondaryNodes ( ) : IEnumerable
Результат IEnumerable

InsertPatch() публичный Метод

Inserts a new coordinate patch into the editing geometry.
public InsertPatch ( int patchIndex, IEnumerable coordinates ) : void
patchIndex int A zero-based index of patch
coordinates IEnumerable A coordinates of inserted patch
Результат void

Redo() публичный Метод

Redo edit action.
public Redo ( ) : void
Результат void

RemoveActiveNode() публичный Метод

Removes the active node.
public RemoveActiveNode ( ) : void
Результат void

RemoveActivePatch() публичный Метод

Removes the active patch.
public RemoveActivePatch ( ) : void
Результат void

RemovePatch() публичный Метод

Removes specified coordinate patch.
public RemovePatch ( int patchIndex ) : void
patchIndex int An zero-based index of patch
Результат void

ReplaceGeometry() публичный Метод

Replaces currently editing geometry with the other one.
public ReplaceGeometry ( IGeometry newGeometry ) : void
newGeometry IGeometry A new instance of IGeometry
Результат void

TryActivateNodeAt() публичный Метод

Tries to activate a node at the specified position.
public TryActivateNodeAt ( ICoordinate coordinate, double nodeSize ) : bool
coordinate ICoordinate A coordinate of node to be activated
nodeSize double A size of node
Результат bool

TryAddNode() публичный Метод

Tries to add a new node into editing geometry.
public TryAddNode ( ICoordinate coordinate ) : bool
coordinate ICoordinate An instance of the ICoordinate to add
Результат bool

Undo() публичный Метод

Undo edit action.
public Undo ( ) : void
Результат void

UpdateActiveNodePosition() публичный Метод

Updates the position of the active node with the specified value
public UpdateActiveNodePosition ( ICoordinate coordinate, bool commitIntoUndoList ) : bool
coordinate ICoordinate New position of the active node
commitIntoUndoList bool A value indicating whether current update should be commited into undo list
Результат bool