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
Показать файл Открыть проект

Открытые методы

Метод Описание
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