Beispiel #1
0
        /// <summary>
        /// Handles the MarketDataUpdate event of the eventController control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void eventController_MarketDataUpdate(object sender, MarketDataUpdateEventArgs e)
        {
            if (InvokeRequired)
            {
                if (e != null)
                {
                    eventController_MarketDataUpdateCallback d = eventController_MarketDataUpdate;
                    BeginInvoke(d, new[] { sender, e });
                }
            }

            if (e == null)
            {
                return;
            }
            if (e.MarketData == null)
            {
                return;
            }

            var index = MarketViewStateItemListGetIndex(e.SenderID);

            if (index >= 0)
            {
                //MarketViewStateItemList[index].MarketData = e.MarketData;
            }
            else
            {
                AddMarket(e.SenderID, e.MarketData);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Handles the MarketDataUpdate event of the eventController control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void eventController_MarketDataUpdate(object sender, MarketDataUpdateEventArgs e)
        {
            if (InvokeRequired)
            {
                if (e != null)
                {
                    eventController_MarketDataUpdateCallback d = eventController_MarketDataUpdate;
                    BeginInvoke(d, new[] { sender, e });
                }
            }

            if (e == null)
            {
                return;
            }
            if (ThreadProcessorId != e.SenderID)
            {
                return;
            }

            MarketData = e.MarketData;
        }