コード例 #1
0
 public static void RunManager()
 {
     lock (objlock)
     {
         if (IsRun)
             return;
         IsRun = true;
         tbm = new ThreadBackgroundManager();
         threadBackgroundManager = new Thread(new ThreadStart(tbm.Start));
         threadBackgroundManager.Name = "ThreadBackgroundManager";
         threadBackgroundManager.Priority = ThreadPriority.Lowest;
         threadBackgroundManager.Start();
     }
 }
コード例 #2
0
 public static void StopManager()
 {
     lock (objlock)
     {
         if (threadBackgroundManager != null)
         {
             threadBackgroundManager.Abort();
             threadBackgroundManager = null;
         }
         if (tbm != null)
         {
             tbm.Stop();
             tbm = null;
         }
     }
 }