C# Класс ArcMapAddinDistanceAndDirection.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, esriRasterOpCode rasterOpCode = esriRasterOpCode.esriROPNOP ) : void

Adds a graphic element to the map graphics container

AddGraphicToMap ( IGeometry geom, bool IsTempGraphic = false ) : void

Adds a graphic to the active view/map graphics container, default color is RED

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

GetEsriGeodeticType ( ) : esriGeodeticType

Get the currently selected geodetic type

GetFormattedPoint ( IPoint point ) : string

Method will return a formatted point as a string based on the configuration settings for display coordinate type

GetGeoPolylineFromPoints ( IPoint startPoint, IPoint endPoint ) : IPolyline

Gets a geodetic polyline from two points startPoint is where it will restart from endPoint is where you want it to end for the return of the polyline

GetGeodeticLengthFromPolyline ( IPolyline polyline ) : double
GetLinearUnit ( ) : 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

IsValid ( System obj ) : bool
OnActivateTool ( object obj ) : void

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

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

OnEditPropertiesDialogCommand ( object obj ) : void

Handler for opening the edit properties dialog

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

OnSaveAs ( object obj ) : void

Saves graphics to file gdb or shp file

OnTabItemSelected ( object obj ) : void

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

PromptSaveFileDialog ( ) : string
RemoveGraphics ( IGraphicsContainer gc, bool removeOnlyTemporary ) : void

Method used to remove graphics from the graphics container Elements are tagged with a GUID on the IElementProperties.Name property Removes graphics from all tabs, not just the tab that is currently active

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

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

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

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