C# 클래스 MEAPI_Samples.frmMEAPI

MEAPI This example demonstrates using the MEAPI to receive available exchanges, products, and contract definitions.
상속: System.Windows.Forms.Form, ITTMarketExplorerEvents, ITTGatewayEvents, ITTProductEvents
파일 보기 프로젝트 열기: tradingtechnologies/CodeSamples_XTAPI_CSharp

공개 메소드들

메소드 설명
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.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Clean up any resources being used.

비공개 메소드들

메소드 설명
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

메소드 상세

Dispose() 보호된 메소드

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

OnContracts() 공개 메소드

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
리턴 void

OnGateway() 공개 메소드

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
리턴 void

OnGatewayAttributes() 공개 메소드

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
리턴 void

OnNewContract() 공개 메소드

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
리턴 void

OnNewProduct() 공개 메소드

TT Gateway recieves new products from an exchange.
public OnNewProduct ( ITTGateway Gateway, ITTProduct Product ) : void
Gateway ITTGateway
Product ITTProduct
리턴 void

OnProductTypes() 공개 메소드

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
리턴 void

OnProducts() 공개 메소드

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
리턴 void

OnProductsFound() 공개 메소드

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
리턴 void

OnProductsNotFound() 공개 메소드

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
리턴 void

OnRequestContractsTimeout() 공개 메소드

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
리턴 void

OnRequestProductsTimeout() 공개 메소드

TT Gateways timeout on a product request
public OnRequestProductsTimeout ( ITTGateway Gateway ) : void
Gateway ITTGateway TT Gateway which timed out
리턴 void

OnServerStatus() 공개 메소드

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
리턴 void

PublishGatewayName() 공개 메소드

Add the gateway to the GUI
public PublishGatewayName ( string gatewayName ) : void
gatewayName string Gateway name
리턴 void

PublishProductTypes() 공개 메소드

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)
리턴 void

PublishProducts() 공개 메소드

Add the products to the GUI
public PublishProducts ( TreeNode prodNode ) : void
prodNode System.Windows.Forms.TreeNode Product TreeNode
리턴 void

frmMEAPI() 공개 메소드

Upon the application form loading, the TTMarketExplorer is instantiated.
public frmMEAPI ( ) : System
리턴 System