private void SearchImage(GrayImage grayImage, Jocr.Ocr.RunOcrHandler runOcrHandler = null)
        {
            if (!JocrWrapper.IsOcrParametersInit)
            {
                progressRing.StartAnimation();
            }

            Task.Run(() =>
            {
                if (!JocrWrapper.IsOcrParametersInit)
                {
                    JocrWrapper.InitOcrParameters();
                }

                currentDispatcher.Invoke(() =>
                {
                    var textBlocks = JocrWrapper.RunOcr(grayImage, runOcrHandler);
                    SearchJOcrResults(textBlocks);
                    progressRing.StopAnimation();
                    OcrFinishedEvent?.Invoke(null, null);
                });
            });
        }
Ejemplo n.º 2
0
 public static void ClassInit(TestContext context)
 {
     JocrWrapper.InitOcrParameters();
 }