C# Class FdoToolbox.Base.Scripting.HostApplication

A helper class that exposes the FDO Toolbox application model and core services out for python scripts to consume.
显示文件 Open project: jumpinjackie/fdotoolbox Class Usage Examples

Public Methods

Method Description
Ask ( string title, string message ) : bool

Displays a question in the form of a yes/no response.

CreateFdoConnection ( string provider, string connectionString, string name ) : void

Creates the fdo connection.

CreateFdoFileConnection ( string file, string name ) : void

Creates the fdo connection.

GetFileForOpen ( string title, string filter ) : string

Invokes an open file dialog and returns the selected filename. If no selection was made, an empty string is returned

GetFileForSave ( string title, string filter ) : string

Invokes a save file dialog and returns the selected filename. If no selection was made, an empty string is returned

GetInput ( string title ) : string

Displays a prompt for user input. If user cancels, null is returned.

LoadConnection ( string path ) : void

Loads a saved connection, the name of the connection will be the name of the file (without the file extension)

PickConnection ( ) : FdoConnection

Prompts the user for a currently open connection

ShowMessage ( string title, string message ) : void

Shows the message in a simple dialog box

WriteLine ( string msg ) : void

Writes the specified message to the application console.

Private Methods

Method Description
InitializeScriptScope ( ScriptScope scope ) : void

Method Details

Ask() public static method

Displays a question in the form of a yes/no response.
public static Ask ( string title, string message ) : bool
title string
message string
return bool

CreateFdoConnection() public static method

Creates the fdo connection.
public static CreateFdoConnection ( string provider, string connectionString, string name ) : void
provider string The provider.
connectionString string The connection string.
name string The name.
return void

CreateFdoFileConnection() public static method

Creates the fdo connection.
public static CreateFdoFileConnection ( string file, string name ) : void
file string The file.
name string The name.
return void

GetFileForOpen() public static method

Invokes an open file dialog and returns the selected filename. If no selection was made, an empty string is returned
public static GetFileForOpen ( string title, string filter ) : string
title string The title.
filter string The filter.
return string

GetFileForSave() public static method

Invokes a save file dialog and returns the selected filename. If no selection was made, an empty string is returned
public static GetFileForSave ( string title, string filter ) : string
title string The title.
filter string The filter.
return string

GetInput() public static method

Displays a prompt for user input. If user cancels, null is returned.
public static GetInput ( string title ) : string
title string
return string

LoadConnection() public static method

Loads a saved connection, the name of the connection will be the name of the file (without the file extension)
public static LoadConnection ( string path ) : void
path string
return void

PickConnection() public static method

Prompts the user for a currently open connection
public static PickConnection ( ) : FdoConnection
return FdoToolbox.Core.Feature.FdoConnection

ShowMessage() public static method

Shows the message in a simple dialog box
public static ShowMessage ( string title, string message ) : void
title string The title.
message string The message.
return void

WriteLine() public static method

Writes the specified message to the application console.
public static WriteLine ( string msg ) : void
msg string The message
return void