public override void Dispose(bool disposing)
 {
     if (disposing)
     {
         // Code to clean up managed resources
         xEng.Dispose();
     }
     // Code to clean up unmanaged resources
 }
 public void Dispose()
 {
     if (_reader != null)
     {
         try
         {
             _reader.CancelScanBarcode();
         }
         catch
         {
         }
         _reader.Dispose();
         _reader = null;
     }
 }