public void Dispose()
 {
     if (_api != null)
     {
         _api.Dispose();
         _api = null;
     }
 }
 public async Task<bool> Init (string language, OcrEngineMode? mode = null)
 {
     try {
         _api = new G8Tesseract (language) { Delegate = _progressHandler };
         _api.Init ();
         if (mode.HasValue)
             SetOcrEngineMode (mode.Value);
         Initialized = true;
     } catch {
         Initialized = false;
     }
     return Initialized;
 }
 public async Task <bool> Init(string language, OcrEngineMode?mode = null)
 {
     try {
         _api = new G8Tesseract(language)
         {
             Delegate = _progressHandler
         };
         _api.Init();
         if (mode.HasValue)
         {
             SetOcrEngineMode(mode.Value);
         }
         Initialized = true;
     } catch {
         Initialized = false;
     }
     return(Initialized);
 }
 public override void ProgressImageRecognitionForTesseract(G8Tesseract tesseract)
 {
     OnProgress((int)tesseract.Progress);
 }
 public void Clear()
 {
     _rect = null;
     G8Tesseract.ClearCache();
 }
 public override void ProgressImageRecognitionForTesseract (G8Tesseract tesseract)
 {
     OnProgress ((int)tesseract.Progress);
 }
 public void Dispose ()
 {
     if (_api != null) {
         _api.Dispose ();
         _api = null;
     }
 }