//---------------------------------------------------------------------- // Component Event //---------------------------------------------------------------------- private void Main_Load(object sender, EventArgs e) { fOnNotifyConnection = new FOnNotifyConnection(OnNotifyConnection); GC.KeepAlive(fOnNotifyConnection); GC.SuppressFinalize(fOnNotifyConnection); fOnNotifyQuote = new FOnNotifyQuote(OnNotifyQuote); GC.KeepAlive(fOnNotifyQuote); GC.SuppressFinalize(fOnNotifyQuote); fOnNotifyTicks = new FOnNotifyTicks(OnNotifyTicks); GC.KeepAlive(fOnNotifyTicks); GC.SuppressFinalize(fOnNotifyTicks); fOnNotifyBest5 = new FOnNotifyBest5(OnNotifyBest5); GC.KeepAlive(fOnNotifyBest5); GC.SuppressFinalize(fOnNotifyBest5); fOnNotifyServerTime = new FOnNotifyServerTime(OnNotifyServerTime); GC.KeepAlive(fOnNotifyServerTime); GC.SuppressFinalize(fOnNotifyServerTime); fOnNotifyMarketTot = new FOnNotifyMarketTot(OnNotifyMarketTot); GC.KeepAlive(fOnNotifyMarketTot); GC.SuppressFinalize(fOnNotifyMarketTot); fOnNotifyMarketBuySell = new FOnNotifyMarketBuySell(OnNotifyMarketBuySell); GC.KeepAlive(fOnNotifyMarketBuySell); GC.SuppressFinalize(fOnNotifyMarketBuySell); fOnNotifyTicksGet = new FOnNotifyTicksGet(OnNotifyTicksGet); GC.KeepAlive(fOnNotifyTicksGet); GC.SuppressFinalize(fOnNotifyTicksGet); fOnProductsReady = new FOnProductsReady(OnProductsReady); GC.KeepAlive(fOnProductsReady); GC.SuppressFinalize(fOnProductsReady); fReconnectTimerEvent = new ReconnectTimerEvent(reconnectTimerEvent); GC.KeepAlive(fReconnectTimerEvent); fOnNotifyFutureTradeInfo = new FOnNotifyFutureTradeInfo(OnNotifyFutureTradeInfo); GC.KeepAlive(fOnNotifyFutureTradeInfo); GC.SuppressFinalize(fOnNotifyFutureTradeInfo); m_dtStocks = CreateStocksDataTable(); m_dtTick = CreateTickDataTable(); m_dtBest5Ask = CreateBest5AskTable(); m_dtBest5Bid = CreateBest5AskTable(); SetDoubleBuffered(gridStocks); this.reconnectTimer.Elapsed += new System.Timers.ElapsedEventHandler(reconnectTimerEvent); this.reconnectTimer.Interval = 60 * 1000; this.reconnectTimer.Enabled = false; }
public static extern int SKQuoteLib_AttachMarketTotCallBack(FOnNotifyMarketTot MarketTot);