public static void StopManager()
 {
     lock (objlock)
     {
         if (threadBackgroundManager != null)
         {
             threadBackgroundManager.Abort();
             threadBackgroundManager = null;
         }
         if (tbm != null)
         {
             tbm.Stop();
             tbm = null;
         }
     }
 }
 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();
     }
 }