public void Dispose()
 {
     _interval = 0;
     _backgroundWorkerActive = false;
     _worker.Stop();
     _worker = null;
 }
 public void Stop()
 {
     if (!stopped)
     {
         backgroundWorker.Stop(backgroundWorkerKey);
         stopped = true;
     }
 }
示例#3
0
        protected override void Dispose(bool disposing)
        {
            if (!disposed)
            {
                if (disposing)
                {
                    backgroundWorker.Stop(backgroundWorkerKey);
                }

                disposed = true;
            }
        }