C# 클래스 WindowHelper.InteropHelper

파일 보기 프로젝트 열기: PeterHorsbollMoller/mbWindowHelper

공개 메소드들

메소드 설명
AddTableToMap ( int windowId, string table ) : void

Adds a table to a existing map

CloseMITable ( string tableName ) : void

Closes a table open in MapInfo

CreateDummyTableWithID ( string tableName ) : void

Create a dummy table with only an ID column

CreateLineInCosmeticLayer ( Int32 windowID, Double startX, Double startY, Double endX, Double endY, String csys ) : void

Inserting points into cosmetic layer

CreatePointInCosmeticLayer ( Int32 windowID, Double pointX, Double pointY, String csys ) : void

Inserting points into cosmetic layer

DisableHandler ( string handlerName ) : void
Do ( string statement ) : void

Sends a statement to MapInfo to be executed

EnableHandler ( string handlerName ) : void
EndOfMITable ( string tableName ) : bool

Checks whether the cursor is at end of table

Eval ( string statement ) : string

Sends a statement to MapInfo to be evaluated

FetchFirstFromMITable ( string tableName ) : void

Fetching first record from a given table

FetchLastFromMITable ( string tableName ) : void

Fetching last record from a given table

FetchNextFromMITable ( string tableName ) : void

Fetching next record from a given table

FetchPrevFromMITable ( string tableName ) : void

Fetching previous record from a given table

GetAppVersion ( ) : string

Gets the MapInfo Professional version number

GetCoordSysClauseFromEPSG ( String EPSG ) : string

Gets the coordinatsystem from an ESPG code

GetDeformattedString ( string numericString ) : string
GetFormattedString ( string numericString ) : string

Given a string representation of a number, in invariant formatting (always using the period as the decimal separator), return a string formatted according to the user's current system settings.

The resulting number string is appropriate for displaying numbers in the user interface, but not appropriate for constructing MapBasic statements. When you construct a MapBasic statement string (to be executed through a call to the Do method), any numeric literals in the string must use period as the decimal separator, even if the user's system's regional settings use some other character as the decimal separator.

GetFrontWindow ( ) : int

Get front window (child window) from the running instance of MapInfo Professional

GetMapWindowId ( ) : int

Get the ID of the front window. Displays a message and returns 0 if there is no window open, or the front window is not a mapper

GetMapperCenterX ( int windowId ) : string

Gets mapper window center X value

GetMapperCenterY ( int windowId ) : string

Gets mapper window center Y value

GetMapperCoordSys ( int windowId ) : string

Get a string representing the coordinate system of the map window

GetMapperDistanceUnit ( int windowId ) : string

Get a string representing the distance unit in use in a specific map window

GetMapperZoom ( int windowId ) : string

Gets mapper window zoom value

GetNumberOfOpenTables ( ) : int

Get a number representing the number of records in a given table

GetOpenTablesList ( ) : string[]

Get a list of open tables

GetSessionCoordSys ( ) : string

Get a string representing the CoordSys clause of the coordinate system that is currently in effect.

GetSessionDistanceUnit ( ) : string

Gets a string representing MapInfo's current distance units, such as mi or km. Defaults to "mi" but can be reset through the Set Distance Units statement.

GetSessionPaperUnit ( ) : string

Gets a string representing MapInfo's current paper units, such as mi or km. Defaults to "in" but can be reset through the Set Distance Units statement.

GetTableCoordsys ( int tableId ) : string

Get a string representing the coordsys of a given table

GetTableCoordsys ( string tableName ) : string

Get a string representing the coordsys of a given table

GetTableNumRows ( int tableId ) : Int32

Get a number representing the number of records in a given table

GetTableNumRows ( string tableName ) : Int32

Get a number representing the number of records in a given table

GetWindowCloneStatement ( int windowId ) : string
GetWindowHeight ( int windowId ) : Double
GetWindowName ( int windowId ) : string

Returns window name for given window id.

GetWindowSystemMenuClose ( int windowId ) : bool
GetWindowType ( int windowId ) : int

Returns window type for given window id.

GetWindowWidth ( int windowId ) : Double
GetWindowWorkspaceStatement ( int windowId ) : string
InsertLineIntoTable ( string table, Double startX, Double startY, Double endX, Double endY, String csys ) : void

Inserting lines into a table

InsertLineIntoTableWithID ( string table, int id, Double startX, Double startY, Double endX, Double endY, String csys ) : void

Inserting lines into a table

InsertPointIntoTable ( string table, Double pointX, Double pointY, String csys ) : void

Inserting points into a table

MakeTableMappable ( string tableName, string csys ) : void

Create a dummy table with only an ID column

PrintMessage ( string sText ) : void

Prints a message to the MapInfo Message window

ReadMBRFromMITableCurrentRecord ( string tableName ) : MBR

Reading a MBR from the object for the current record in a table

ReadValueFromMITableCurrentRecord ( string tableName, string columnName ) : string

Reading a value from a column for the current record in a table

RunSQLStatement ( string sCmd, string sIntoTable ) : Int32
SetCoordSysUsingTable ( string tableName ) : void

Sets the current coordinatsystem using a table

SetCoordSysUsingWindow ( Int32 windowID ) : void

Sets the current coordinatsystem using a mapper

SetSessionCoordSys ( string csys ) : void

Set the current coordinate system. Has the same effect as typing a Set CoordSys statement into the MapBasic window.

SetSessionDistanceUnit ( string unit ) : void

Sets MapInfo's current distance unit, such as mi or km. Has the same effect as typing a Set Distance Units statement into the MapBasic window.

SetSessionPaperUnit ( string unit ) : void

Sets MapInfo's current paper unit, such as in or cm. Has the same effect as typing a Set Paper Units statement into the MapBasic window.

SetView ( int windowId, double centerX, double centerY, double mapperZoom, string unit, string csys ) : void
SetView ( int windowId, string mapperZoom, string unit ) : void

Sets the current view of mapper window represented by windowId

SetView ( int windowId, string centerX, string centerY, string csys ) : void

Sets the current view of mapper window represented by windowId

SetView ( int windowId, string centerX, string centerY, string mapperZoom, string unit, string csys ) : void

Sets the current view of mapper window represented by windowId

SetViewMBR ( int windowId, MBR mipMBR, string unit, string csys ) : void

Sets the current view of mapper window represented by windowId using a MapInfo MBR

SetViewTable ( int windowId, string table ) : void

Sets the current view of mapper window represented by windowId to match a table

비공개 메소드들

메소드 설명
GetMapperInfo ( int windowId, int infoType ) : string

Gets the view information from a mapper window in MapInfo Professional application

MapBasic's MapperInfo function can return numeric information such as Zoom width. However, MapInfoApplication.Eval returns results as strings, so if you request numeric information such as MAPPER_INFO_ZOOM, Eval will return a string such as "1234.5" (with a period as the decimal separator, regardless of the user's regional settings). Instead of parsing such String results into Double values, we will return the String results. The string representation of numeric values is ideal for this application, because the string formatting returned by the Eval method (i.e. always using the period as the decimal separator) is appropriate for use in the Set Map statement we will be constructing later on.

GetTableInfo ( int tableId, int infoType ) : string

Gets the view information from a mapper window in MapInfo Professional application

MapBasic's TableInfo function can return numeric information such as Minimun X coordinate. However, MapInfoApplication.Eval returns results as strings, so if you request numeric information such as TAB_INFO_MINX, Eval will return a string such as "123456.789" (with a period as the decimal separator, regardless of the user's regional settings). Instead of parsing such String results into Double values, we will return the String results.

GetTableInfo ( string tableName, int infoType ) : string

메소드 상세

AddTableToMap() 공개 정적인 메소드

Adds a table to a existing map
public static AddTableToMap ( int windowId, string table ) : void
windowId int Window identification number of mapper window
table string Title of table to add
리턴 void

CloseMITable() 공개 정적인 메소드

Closes a table open in MapInfo
public static CloseMITable ( string tableName ) : void
tableName string identification name of table
리턴 void

CreateDummyTableWithID() 공개 정적인 메소드

Create a dummy table with only an ID column
public static CreateDummyTableWithID ( string tableName ) : void
tableName string identification name of table
리턴 void

CreateLineInCosmeticLayer() 공개 정적인 메소드

Inserting points into cosmetic layer
public static CreateLineInCosmeticLayer ( Int32 windowID, Double startX, Double startY, Double endX, Double endY, String csys ) : void
windowID System.Int32
startX Double
startY Double
endX Double
endY Double
csys String
리턴 void

CreatePointInCosmeticLayer() 공개 정적인 메소드

Inserting points into cosmetic layer
public static CreatePointInCosmeticLayer ( Int32 windowID, Double pointX, Double pointY, String csys ) : void
windowID System.Int32
pointX Double
pointY Double
csys String
리턴 void

DisableHandler() 공개 정적인 메소드

public static DisableHandler ( string handlerName ) : void
handlerName string
리턴 void

Do() 공개 정적인 메소드

Sends a statement to MapInfo to be executed
public static Do ( string statement ) : void
statement string statement to send to MapInfo
리턴 void

EnableHandler() 공개 정적인 메소드

public static EnableHandler ( string handlerName ) : void
handlerName string
리턴 void

EndOfMITable() 공개 정적인 메소드

Checks whether the cursor is at end of table
public static EndOfMITable ( string tableName ) : bool
tableName string identification name of table
리턴 bool

Eval() 공개 정적인 메소드

Sends a statement to MapInfo to be evaluated
public static Eval ( string statement ) : string
statement string statement to send to MapInfo
리턴 string

FetchFirstFromMITable() 공개 정적인 메소드

Fetching first record from a given table
public static FetchFirstFromMITable ( string tableName ) : void
tableName string identification name of table
리턴 void

FetchLastFromMITable() 공개 정적인 메소드

Fetching last record from a given table
public static FetchLastFromMITable ( string tableName ) : void
tableName string identification name of table
리턴 void

FetchNextFromMITable() 공개 정적인 메소드

Fetching next record from a given table
public static FetchNextFromMITable ( string tableName ) : void
tableName string identification name of table
리턴 void

FetchPrevFromMITable() 공개 정적인 메소드

Fetching previous record from a given table
public static FetchPrevFromMITable ( string tableName ) : void
tableName string identification name of table
리턴 void

GetAppVersion() 공개 정적인 메소드

Gets the MapInfo Professional version number
public static GetAppVersion ( ) : string
리턴 string

GetCoordSysClauseFromEPSG() 공개 정적인 메소드

Gets the coordinatsystem from an ESPG code
public static GetCoordSysClauseFromEPSG ( String EPSG ) : string
EPSG String
리턴 string

GetDeformattedString() 공개 정적인 메소드

public static GetDeformattedString ( string numericString ) : string
numericString string
리턴 string

GetFormattedString() 공개 정적인 메소드

Given a string representation of a number, in invariant formatting (always using the period as the decimal separator), return a string formatted according to the user's current system settings.
The resulting number string is appropriate for displaying numbers in the user interface, but not appropriate for constructing MapBasic statements. When you construct a MapBasic statement string (to be executed through a call to the Do method), any numeric literals in the string must use period as the decimal separator, even if the user's system's regional settings use some other character as the decimal separator.
public static GetFormattedString ( string numericString ) : string
numericString string A number string with period (.) as the decimal separator, if any
리턴 string

GetFrontWindow() 공개 정적인 메소드

Get front window (child window) from the running instance of MapInfo Professional
public static GetFrontWindow ( ) : int
리턴 int

GetMapWindowId() 공개 정적인 메소드

Get the ID of the front window. Displays a message and returns 0 if there is no window open, or the front window is not a mapper
public static GetMapWindowId ( ) : int
리턴 int

GetMapperCenterX() 공개 정적인 메소드

Gets mapper window center X value
public static GetMapperCenterX ( int windowId ) : string
windowId int window identification number of mapper window
리턴 string

GetMapperCenterY() 공개 정적인 메소드

Gets mapper window center Y value
public static GetMapperCenterY ( int windowId ) : string
windowId int window identification number of mapper window
리턴 string

GetMapperCoordSys() 공개 정적인 메소드

Get a string representing the coordinate system of the map window
public static GetMapperCoordSys ( int windowId ) : string
windowId int identification number of mapper window
리턴 string

GetMapperDistanceUnit() 공개 정적인 메소드

Get a string representing the distance unit in use in a specific map window
public static GetMapperDistanceUnit ( int windowId ) : string
windowId int identification number of mapper window
리턴 string

GetMapperZoom() 공개 정적인 메소드

Gets mapper window zoom value
public static GetMapperZoom ( int windowId ) : string
windowId int identification number of mapper window
리턴 string

GetNumberOfOpenTables() 공개 정적인 메소드

Get a number representing the number of records in a given table
public static GetNumberOfOpenTables ( ) : int
리턴 int

GetOpenTablesList() 공개 정적인 메소드

Get a list of open tables
public static GetOpenTablesList ( ) : string[]
리턴 string[]

GetSessionCoordSys() 공개 정적인 메소드

Get a string representing the CoordSys clause of the coordinate system that is currently in effect.
public static GetSessionCoordSys ( ) : string
리턴 string

GetSessionDistanceUnit() 공개 정적인 메소드

Gets a string representing MapInfo's current distance units, such as mi or km. Defaults to "mi" but can be reset through the Set Distance Units statement.
public static GetSessionDistanceUnit ( ) : string
리턴 string

GetSessionPaperUnit() 공개 정적인 메소드

Gets a string representing MapInfo's current paper units, such as mi or km. Defaults to "in" but can be reset through the Set Distance Units statement.
public static GetSessionPaperUnit ( ) : string
리턴 string

GetTableCoordsys() 공개 정적인 메소드

Get a string representing the coordsys of a given table
public static GetTableCoordsys ( int tableId ) : string
tableId int identification number of table
리턴 string

GetTableCoordsys() 공개 정적인 메소드

Get a string representing the coordsys of a given table
public static GetTableCoordsys ( string tableName ) : string
tableName string identification name of table
리턴 string

GetTableNumRows() 공개 정적인 메소드

Get a number representing the number of records in a given table
public static GetTableNumRows ( int tableId ) : Int32
tableId int identification number of table
리턴 System.Int32

GetTableNumRows() 공개 정적인 메소드

Get a number representing the number of records in a given table
public static GetTableNumRows ( string tableName ) : Int32
tableName string identification name of table
리턴 System.Int32

GetWindowCloneStatement() 공개 정적인 메소드

public static GetWindowCloneStatement ( int windowId ) : string
windowId int
리턴 string

GetWindowHeight() 공개 정적인 메소드

public static GetWindowHeight ( int windowId ) : Double
windowId int
리턴 Double

GetWindowName() 공개 정적인 메소드

Returns window name for given window id.
public static GetWindowName ( int windowId ) : string
windowId int
리턴 string

GetWindowSystemMenuClose() 공개 정적인 메소드

public static GetWindowSystemMenuClose ( int windowId ) : bool
windowId int
리턴 bool

GetWindowType() 공개 정적인 메소드

Returns window type for given window id.
public static GetWindowType ( int windowId ) : int
windowId int
리턴 int

GetWindowWidth() 공개 정적인 메소드

public static GetWindowWidth ( int windowId ) : Double
windowId int
리턴 Double

GetWindowWorkspaceStatement() 공개 정적인 메소드

public static GetWindowWorkspaceStatement ( int windowId ) : string
windowId int
리턴 string

InsertLineIntoTable() 공개 정적인 메소드

Inserting lines into a table
public static InsertLineIntoTable ( string table, Double startX, Double startY, Double endX, Double endY, String csys ) : void
table string
startX Double
startY Double
endX Double
endY Double
csys String
리턴 void

InsertLineIntoTableWithID() 공개 정적인 메소드

Inserting lines into a table
public static InsertLineIntoTableWithID ( string table, int id, Double startX, Double startY, Double endX, Double endY, String csys ) : void
table string
id int
startX Double
startY Double
endX Double
endY Double
csys String
리턴 void

InsertPointIntoTable() 공개 정적인 메소드

Inserting points into a table
public static InsertPointIntoTable ( string table, Double pointX, Double pointY, String csys ) : void
table string
pointX Double
pointY Double
csys String
리턴 void

MakeTableMappable() 공개 정적인 메소드

Create a dummy table with only an ID column
public static MakeTableMappable ( string tableName, string csys ) : void
tableName string identification name of table
csys string
리턴 void

PrintMessage() 공개 정적인 메소드

Prints a message to the MapInfo Message window
public static PrintMessage ( string sText ) : void
sText string
리턴 void

ReadMBRFromMITableCurrentRecord() 공개 정적인 메소드

Reading a MBR from the object for the current record in a table
public static ReadMBRFromMITableCurrentRecord ( string tableName ) : MBR
tableName string identification name of table
리턴 WindowHelper.Geometry.MBR

ReadValueFromMITableCurrentRecord() 공개 정적인 메소드

Reading a value from a column for the current record in a table
public static ReadValueFromMITableCurrentRecord ( string tableName, string columnName ) : string
tableName string identification name of table
columnName string identification name of column
리턴 string

RunSQLStatement() 공개 정적인 메소드

public static RunSQLStatement ( string sCmd, string sIntoTable ) : Int32
sCmd string
sIntoTable string
리턴 System.Int32

SetCoordSysUsingTable() 공개 정적인 메소드

Sets the current coordinatsystem using a table
public static SetCoordSysUsingTable ( string tableName ) : void
tableName string identification name of table
리턴 void

SetCoordSysUsingWindow() 공개 정적인 메소드

Sets the current coordinatsystem using a mapper
public static SetCoordSysUsingWindow ( Int32 windowID ) : void
windowID System.Int32 identification ID of a Window
리턴 void

SetSessionCoordSys() 공개 정적인 메소드

Set the current coordinate system. Has the same effect as typing a Set CoordSys statement into the MapBasic window.
public static SetSessionCoordSys ( string csys ) : void
csys string string such as "CoordSys Earth"
리턴 void

SetSessionDistanceUnit() 공개 정적인 메소드

Sets MapInfo's current distance unit, such as mi or km. Has the same effect as typing a Set Distance Units statement into the MapBasic window.
public static SetSessionDistanceUnit ( string unit ) : void
unit string a distance unit string, such as mi or km
리턴 void

SetSessionPaperUnit() 공개 정적인 메소드

Sets MapInfo's current paper unit, such as in or cm. Has the same effect as typing a Set Paper Units statement into the MapBasic window.
public static SetSessionPaperUnit ( string unit ) : void
unit string a distance unit string, such as in or cm
리턴 void

SetView() 공개 정적인 메소드

public static SetView ( int windowId, double centerX, double centerY, double mapperZoom, string unit, string csys ) : void
windowId int
centerX double
centerY double
mapperZoom double
unit string
csys string
리턴 void

SetView() 공개 정적인 메소드

Sets the current view of mapper window represented by windowId
public static SetView ( int windowId, string mapperZoom, string unit ) : void
windowId int Window identification number of mapper window
mapperZoom string New zoom of the mapper window
unit string Distance unit string that applies to mapperZoom, such as mi or km
리턴 void

SetView() 공개 정적인 메소드

Sets the current view of mapper window represented by windowId
public static SetView ( int windowId, string centerX, string centerY, string csys ) : void
windowId int Window identification number of mapper window
centerX string New center X of the mapper window
centerY string New center Y of the mapper window
csys string CoordSys string that specifies the coordinate system used by the X/Y arguments
리턴 void

SetView() 공개 정적인 메소드

Sets the current view of mapper window represented by windowId
public static SetView ( int windowId, string centerX, string centerY, string mapperZoom, string unit, string csys ) : void
windowId int Window identification number of mapper window
centerX string New center X of the mapper window
centerY string New center Y of the mapper window
mapperZoom string New zoom of the mapper window
unit string Distance unit string that applies to mapperZoom, such as mi or km
csys string CoordSys string that specifies the coordinate system used by the X/Y arguments
리턴 void

SetViewMBR() 공개 정적인 메소드

Sets the current view of mapper window represented by windowId using a MapInfo MBR
public static SetViewMBR ( int windowId, MBR mipMBR, string unit, string csys ) : void
windowId int Window identification number of mapper window
mipMBR WindowHelper.Geometry.MBR MBR to fit Map to
unit string
csys string CoordSys string that specifies the coordinate system used by the mipMBR arguments
리턴 void

SetViewTable() 공개 정적인 메소드

Sets the current view of mapper window represented by windowId to match a table
public static SetViewTable ( int windowId, string table ) : void
windowId int Window identification number of mapper window
table string Table to zoom to
리턴 void