Пример #1
0
        /// <summary>
        /// Handles the DataProcessorMarketThreadStatusChanged 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_DataProcessorMarketThreadStatusChanged(object sender, DataProcessorMarketThreadStatusChangedEventArgs e)
        {
            if (InvokeRequired)
            {
                MarketThreadStatusChangedEventDelegate d = eventController_DataProcessorMarketThreadStatusChanged;
                BeginInvoke(d, new[] { sender, e });
            }

            if (e == null)
            {
                return;
            }

            var index = MarketViewStateItemListGetIndex(e.SenderID);

            if (index < 0)
            {
                return;
            }

            if (e.Status == "CLOSED")
            {
                RemoveMarket(e.SenderID);
            }
            //else
            //    MarketViewStateItemList[index].ThreadProcessorStatus = e.Status;
        }
Пример #2
0
 /// <summary>
 /// Handles the DataProcessorMarketThreadStatusChanged 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_DataProcessorMarketThreadStatusChanged(object sender, DataProcessorMarketThreadStatusChangedEventArgs e)
 {
     if (InvokeRequired)
     {
         MarketThreadStatusChangedEventDelegate d = eventController_DataProcessorMarketThreadStatusChanged;
         BeginInvoke(d, new[] { sender, e });
     }
     else
     {
         if (e.SenderID != ThreadProcessorId)
         {
             return;
         }
         ThreadStatus = e.Status;
     }
 }