C# Класс ArcMapAddinVisibility.ViewModels.TabBaseViewModel

Base class for all the common properties, commands and events for tab items
Наследование: BaseViewModel
Показать файл Открыть проект

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

Метод Описание
DeactivateTool ( string toolname ) : void

Method used to deactivate tool

SetToolActiveInToolBar ( ESRI application, System toolName ) : void

Method to set the map tool as the active tool for the map

TabBaseViewModel ( ) : System

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

Метод Описание
AddGraphicToMap ( IGeometry geom, IColor color, bool IsTempGraphic = false, esriSimpleMarkerStyle markerStyle = esriSimpleMarkerStyle.esriSMSCircle, int size = 5 ) : string

Adds a graphic element to the map graphics container

AddGraphicToMap ( IGeometry geom ) : void
AddGraphicToMap ( IGeometry geom, IColor color ) : void
AddGraphicToMap ( IGeometry geom, bool isTemp ) : void
AddTextToMap ( string text, IGeometry geom, IColor color, bool IsTempGraphic = false, int size = 12 ) : string
ClearTempGraphics ( ) : void

Method to clear all temp graphics

CreateFeedback ( IPoint point, IActiveView av ) : void

Creates a new geodetic line feedback to visualize the line to the user

CreateMapElement ( ) : void

Method is called when a user pressed the "Enter" key or when a second point is created for a line from mouse clicks Derived class must override this method in order to create map elements Clears temp graphics by default

FeedbackMoveTo ( IPoint point ) : void

Method to use when you need to move a feedback line to a point This forces a new point to be used, sometimes this method projects the point to a different spatial reference

GetDistanceFromTo ( DistanceTypes fromType, DistanceTypes toType, double input ) : double

Ugly method to convert to/from different types of distance units

GetDistanceType ( int linearUnitFactoryCode ) : DistanceTypes
GetEsriGeodeticType ( ) : esriGeodeticType

Get the currently selected geodetic type

GetGeodeticLengthFromPolyline ( IPolyline polyline ) : double
GetLinearUnit ( ) : ILinearUnit
GetLinearUnit ( DistanceTypes distanceType ) : ILinearUnit

Gets the linear unit from the esri constants for linear units

GetPointFromString ( string coordinate ) : IPoint

Method used to convert a string to a known coordinate Assumes WGS84 for now Uses the IConversionNotation interface

GetPolylineFromFeedback ( IPoint startPoint, IPoint endPoint ) : IPolyline

Gets a polyline from the feedback object startPoint is where it will restart from endPoint is where you want it to end for the return of the polyline

MoveTempGraphicsToMapGraphics ( ) : void

Method used to move temp graphics to map graphics Tools use this to make temp graphics permanent on completion otherwise temp graphics get cleared on reset/cancel

OnActivateTool ( object obj ) : void

Activates the map tool to get map points from mouse clicks/movement

OnCancelCommand ( object obj ) : void
OnClearGraphics ( object obj ) : void

Clears all the graphics from the maps graphic container Inlucdes temp and map graphics Only removes temp and map graphics that were created by this add-in

OnEnterKeyCommand ( object obj ) : void

Handler for the "Enter"key command Calls CreateMapElement

OnMouseMoveEvent ( object obj ) : void

Handler for the mouse move event When the mouse moves accross the map, IPoints are returned to aid in updating feedback to user

OnNewMapPointEvent ( object obj ) : void

Handler for the new map point click event

OnTabItemSelected ( object obj ) : void

Handler for the tab item selected event Helps keep track of which tab item/viewmodel is active

RemoveGraphics ( IGraphicsContainer gc, List list ) : void

Method used to remove graphics from the graphics container Elements are tagged with a GUID on the IElementProperties.Name property

RemoveGraphics ( List guidList ) : void
Reset ( bool toolReset ) : void

Method used to totally reset the tool reset points, feedback clear out textboxes

ResetFeedback ( ) : void

Resets feedback aka cancels feedback

ResetPoints ( ) : void

Resets Points 1 and 2

UpdateDistance ( IGeometry geometry ) : void

Gets the distance/lenght of a polyline

UpdateDistanceFromTo ( DistanceTypes fromType, DistanceTypes toType ) : void

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

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

Method used to deactivate tool
public DeactivateTool ( string toolname ) : void
toolname string
Результат void

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

Method to set the map tool as the active tool for the map
public SetToolActiveInToolBar ( ESRI application, System toolName ) : void
application ESRI
toolName System
Результат void

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

public TabBaseViewModel ( ) : System
Результат System