public doOCR ( string imageFilePath = "", bool manuallyTriggered = true ) : void | ||
imageFilePath | string | |
manuallyTriggered | bool | |
Результат | void |
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; }
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 = ""; } }