C# Class MEAPI_Samples.frmMEAPI

MEAPI This example demonstrates using the MEAPI to receive available exchanges, products, and contract definitions.
Inheritance: System.Windows.Forms.Form, ITTMarketExplorerEvents, ITTGatewayEvents, ITTProductEvents
Afficher le fichier Open project: tradingtechnologies/CodeSamples_XTAPI_CSharp

Méthodes publiques

Méthode Description
OnContracts ( ITTGateway Gateway, ITTProduct Product, ITTContractCollection contracts ) : void

TT Gateways deliver a list of contracts associated with the product

OnGateway ( ITTGateway Gateway ) : void

TT Gateways are found in response to a RequestGateways method call or when TT Gateways become available.

OnGatewayAttributes ( ITTGateway Gateway, string attributeList, enumServiceType service ) : void

MEAPI recieves the gateway attribute list (GAL settings) for the TT Gateway.

OnNewContract ( ITTGateway Gateway, ITTProduct Product, ITTContractInfo contractInfo ) : void

TT Gateways add new contracts for a product

OnNewProduct ( ITTGateway Gateway, ITTProduct Product ) : void

TT Gateway recieves new products from an exchange.

OnProductTypes ( ITTGateway Gateway, object productTypes, object productTypesAsString ) : void

TT Gateways return a list of product types hosted on the TT Gateway

OnProducts ( ITTGateway Gateway, ITTProductCollection Products ) : void

TT Gateways return a list of products hosted on the TT Gateway

OnProductsFound ( ITTGateway Gateway, ITTProductCollection Products ) : void

TT Gateways find products that match a product request

OnProductsNotFound ( ITTGateway Gateway ) : void

TT Gateways find no products matching a product request or query.

OnRequestContractsTimeout ( ITTGateway Gateway, ITTProduct Product ) : void

Contract download times out

OnRequestProductsTimeout ( ITTGateway Gateway ) : void

TT Gateways timeout on a product request

OnServerStatus ( ITTGateway Gateway, enumServiceType service, int IsAvailable, int IsLoggedIn ) : void

Status of a TT Gateway server change

PublishGatewayName ( string gatewayName ) : void

Add the gateway to the GUI

PublishProductTypes ( string prodTypes, int prodIndices ) : void

Add the product types to the GUI

PublishProducts ( TreeNode prodNode ) : void

Add the products to the GUI

frmMEAPI ( ) : System

Upon the application form loading, the TTMarketExplorer is instantiated.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

Private Methods

Méthode Description
InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

ReleaseProductEventHandlers ( ) : void

Unregister all the event handlers belonging to the products

aboutToolStripMenuItem_Click ( object sender, EventArgs e ) : void
btnReqestGateways_Click ( object sender, EventArgs e ) : void

Request gateways

lbGateways_SelectedIndexChanged ( object sender, EventArgs e ) : void

Gateway has been selected

lbProductTypes_SelectedIndexChanged ( object sender, EventArgs e ) : void

Product has been selected

mainWindow_FormClosed ( object sender, System.Windows.Forms.FormClosedEventArgs e ) : void
tvProductList_ItemDrag ( object sender, ItemDragEventArgs e ) : void

Contract has begun it's drag event

tvProductList_NodeMouseClick ( object sender, TreeNodeMouseClickEventArgs e ) : void

Save the parent when the child has been clicked - used to find the correct contract to drag

Method Details

Dispose() protected méthode

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
Résultat void

OnContracts() public méthode

TT Gateways deliver a list of contracts associated with the product
public OnContracts ( ITTGateway Gateway, ITTProduct Product, ITTContractCollection contracts ) : void
Gateway ITTGateway TT Gateway on which the product contracts trade
Product ITTProduct Product associated with the contracts
contracts ITTContractCollection Collection of the contracts available for the product
Résultat void

OnGateway() public méthode

TT Gateways are found in response to a RequestGateways method call or when TT Gateways become available.
public OnGateway ( ITTGateway Gateway ) : void
Gateway ITTGateway The TT Gateway object found by the MEAPI
Résultat void

OnGatewayAttributes() public méthode

MEAPI recieves the gateway attribute list (GAL settings) for the TT Gateway.
public OnGatewayAttributes ( ITTGateway Gateway, string attributeList, enumServiceType service ) : void
Gateway ITTGateway TT Gateway whose GAL settings changed
attributeList string Comma-separated list of GAL name-value pairs
service enumServiceType Service that started or restarted
Résultat void

OnNewContract() public méthode

TT Gateways add new contracts for a product
public OnNewContract ( ITTGateway Gateway, ITTProduct Product, ITTContractInfo contractInfo ) : void
Gateway ITTGateway TT Gateway on which the product was added
Product ITTProduct Product associated with the new contract
contractInfo ITTContractInfo New Contract
Résultat void

OnNewProduct() public méthode

TT Gateway recieves new products from an exchange.
public OnNewProduct ( ITTGateway Gateway, ITTProduct Product ) : void
Gateway ITTGateway
Product ITTProduct
Résultat void

OnProductTypes() public méthode

TT Gateways return a list of product types hosted on the TT Gateway
public OnProductTypes ( ITTGateway Gateway, object productTypes, object productTypesAsString ) : void
Gateway ITTGateway TT Gateway containing the product types
productTypes object Array of product type IDs
productTypesAsString object Array of product type names
Résultat void

OnProducts() public méthode

TT Gateways return a list of products hosted on the TT Gateway
public OnProducts ( ITTGateway Gateway, ITTProductCollection Products ) : void
Gateway ITTGateway TT Gateway whose products are requested
Products ITTProductCollection Prodcut collection from the gateway
Résultat void

OnProductsFound() public méthode

TT Gateways find products that match a product request
public OnProductsFound ( ITTGateway Gateway, ITTProductCollection Products ) : void
Gateway ITTGateway TT Gateway containing the products
Products ITTProductCollection Collection of products returned by the TT Gateway
Résultat void

OnProductsNotFound() public méthode

TT Gateways find no products matching a product request or query.
public OnProductsNotFound ( ITTGateway Gateway ) : void
Gateway ITTGateway TT Gateway from which you requested products
Résultat void

OnRequestContractsTimeout() public méthode

Contract download times out
public OnRequestContractsTimeout ( ITTGateway Gateway, ITTProduct Product ) : void
Gateway ITTGateway TT Gateway on which the contracts product trades
Product ITTProduct Product associated with the contract
Résultat void

OnRequestProductsTimeout() public méthode

TT Gateways timeout on a product request
public OnRequestProductsTimeout ( ITTGateway Gateway ) : void
Gateway ITTGateway TT Gateway which timed out
Résultat void

OnServerStatus() public méthode

Status of a TT Gateway server change
public OnServerStatus ( ITTGateway Gateway, enumServiceType service, int IsAvailable, int IsLoggedIn ) : void
Gateway ITTGateway Gateway affected by the server status change
service enumServiceType Service whose status changed.
IsAvailable int Current status of the service
IsLoggedIn int Current logged in status
Résultat void

PublishGatewayName() public méthode

Add the gateway to the GUI
public PublishGatewayName ( string gatewayName ) : void
gatewayName string Gateway name
Résultat void

PublishProductTypes() public méthode

Add the product types to the GUI
public PublishProductTypes ( string prodTypes, int prodIndices ) : void
prodTypes string Array of product types
prodIndices int Array of the product indices (current not used)
Résultat void

PublishProducts() public méthode

Add the products to the GUI
public PublishProducts ( TreeNode prodNode ) : void
prodNode System.Windows.Forms.TreeNode Product TreeNode
Résultat void

frmMEAPI() public méthode

Upon the application form loading, the TTMarketExplorer is instantiated.
public frmMEAPI ( ) : System
Résultat System