Ejemplo n.º 1
0
 //循环执行
 private void playLoop()
 {
     if (updateDelegate == null)
     {
         updateDelegate = new updateBox_PreviewBoxSafe(threadLoop);
     }
     while (beShown)
     {
         if (uiControl.InvokeRequired)
         {
             uiControl.Invoke(updateDelegate);
         }
         else
         {
             threadLoop();
         }
         if (threadSleep > 0)
         {
             Thread.Sleep(threadSleep);
         }
     }
 }
Ejemplo n.º 2
0
 //循环执行
 private void playLoop()
 {
     if (updateDelegate == null)
     {
         updateDelegate = new updateBox_PreviewBoxSafe(threadLoop);
     }
     while (beShown)
     {
         if (uiControl.InvokeRequired)
         {
             uiControl.Invoke(updateDelegate);
         }
         else
         {
             threadLoop();
         }
         if (threadSleep > 0)
         {
             Thread.Sleep(threadSleep);
         }
     }
 }