コード例 #1
0
 protected override void OnThreadUpdate()
 {
     if (IsUpdating || !Exchange.IsInitialized)
     {
         return;
     }
     IsUpdating = true;
     try {
         if (!Exchange.SupportWebSocket(WebSocketType.Tickers))
         {
             Exchange.UpdateTickersInfo();
         }
         DataCacheManager.UpdateTasks();
         for (int i = 0; i < Exchange.Tickers.Count; i++)
         {
             Exchange.Tickers[i].UpdateTrailings();
         }
     }
     finally {
         IsUpdating = false;
     }
     if (IsHandleCreated)
     {
         BeginInvoke(new Action(() => {
             UpdateConnectionStatus();
             UpdateCachedDataCountInfo();
             if (!Exchange.SupportWebSocket(WebSocketType.Tickers))
             {
                 this.gvTikers.RefreshData();
             }
         }));
     }
 }