doOCR() public method

public doOCR ( string imageFilePath = "", bool manuallyTriggered = true ) : void
imageFilePath string
manuallyTriggered bool
return void
Esempio n. 1
0
 void inventoryCheckTimer_Tick(object sender, EventArgs e)
 {
     if (OCRing == true)
     {
         return;
     }
     lblStatus.Text = "..";
     Application.DoEvents();
     OCRing = true;
     if (!ArkOCR.OCR.isDinoInventoryVisible())
     {
         for (int i = 0; i < labels.Count(); i++)
         {
             if (labels[i] != null)
             {
                 labels[i].Text = "";
             }
         }
     }
     else
     {
         lblStatus.Text = "Reading Values";
         Application.DoEvents();
         if (ExtractorForm != null)
         {
             ExtractorForm.doOCR("", false);
         }
     }
     OCRing         = false;
     lblStatus.Text = "";
     Application.DoEvents();
     return;
 }
Esempio n. 2
0
        private void TimerUpdateTimer_Tick(object sender, EventArgs e)
        {
            if (timers.Count > 0)
            {
                setTimer();
            }

            toggleInventoryCheck = !toggleInventoryCheck;
            if (checkInventoryStats && toggleInventoryCheck)
            {
                if (OCRing == true)
                {
                    return;
                }
                lblStatus.Text = "…";
                Application.DoEvents();
                OCRing = true;
                if (!ArkOCR.OCR.isDinoInventoryVisible())
                {
                    if (currentlyInInventory)
                    {
                        for (int i = 0; i < labels.Count(); i++)
                        {
                            if (labels[i] != null)
                            {
                                labels[i].Text = "";
                            }
                        }
                        currentlyInInventory = false;
                    }
                }
                else if (currentlyInInventory)
                {
                    // assuming it's still the same inventory, don't do anything, assuming nothing changed
                }
                else
                {
                    currentlyInInventory = true;
                    lblStatus.Text       = "Reading Values";
                    Application.DoEvents();
                    if (ExtractorForm != null)
                    {
                        ExtractorForm.doOCR("", false);
                    }
                }
                OCRing         = false;
                lblStatus.Text = "";
                Application.DoEvents();
            }

            // info
            if (labelInfo.Text != "" && infoShownAt.AddSeconds(InfoDuration) < DateTime.Now)
            {
                labelInfo.Text = "";
            }
        }