public TesseractApi (Context context) { _context = context; _progressHandler.Progress += (sender, e) => { OnProgress (e.Progress); }; _api = new TessBaseAPI (_progressHandler); }
public TesseractApi (Context context, AssetsDeployment assetsDeployment) { _assetsDeployment = assetsDeployment; _context = context; _progressHandler.Progress += (sender, e) => { OnProgress (e.Progress); }; _api = new TessBaseAPI (_progressHandler); }
// Grab text from image private string GetText(TessBaseAPI tessBaseAPI, int partX, int partY) { // These can change depending on resolution, HUD scaling, or UI changes // For now, only supports 1440p with full HUD scaling // TODO: Dynamic scaling const int BOXWIDTH = 311; const int BOXHEIGHT = 33; // Set image location start tessBaseAPI.SetRectangle(partX, partY, BOXWIDTH, BOXHEIGHT); // Recognize image tessBaseAPI.Recognize(); ResultIterator resultIterator = tessBaseAPI.GetIterator(); // Extract text from result iterator StringBuilder stringBuilder = new StringBuilder(); PageIteratorLevel pageIteratorLevel = PageIteratorLevel.RIL_PARA; do { stringBuilder.Append(resultIterator.GetUTF8Text(pageIteratorLevel)); } while (resultIterator.Next(pageIteratorLevel)); // Fix up string for Warframe.market stringBuilder = stringBuilder.Replace("\n", String.Empty); string guess = stringBuilder.ToString(); // Changed to use Levenshtein here due to important of having a matching "Blueprint" word Levenshtein levBP = new Fastenshtein.Levenshtein("Blueprint"); int levBPDistance = levBP.DistanceFrom(guess); Debug.WriteLine("Distance from Blueprint: " + levBPDistance); // If there is a 4-character difference, accept the word is == "Blueprint" // Adjust the offset for 2-lined parts if (levBPDistance < 5) { guess = GetText(tessBaseAPI, partX, 550); } // Match whatever result we get to the closest selling item name from Warframe.market // We want to ignore "Blueprint" because this indicates that it's a 2-lined item if (guess != "Blueprint" && !guess.Contains("Forma")) { Debug.Write(""); Debug.Write("Old: " + guess); guess = FindClosestWord(guess); Debug.WriteLine(" | New: " + guess); } return(guess); }
public static void Main(string[] args) { Tesseract.Native.DllImports.TesseractDirectory = @"C:\Test\tesseract"; TessBaseAPI tessBaseAPI = new TessBaseAPI(); System.Console.WriteLine("The current version is {0}", tessBaseAPI.GetVersion()); System.Console.WriteLine("Press any key to quit..."); System.Console.ReadKey(); }
public TesseractApi2() { Context context = Android.App.Application.Context; AssetsDeployment assetsDeployment = default; _assetsDeployment = assetsDeployment; _context = context; _progressHandler.Progress += (sender, e) => { OnProgress(e.Progress); }; _api = new TessBaseAPI(_progressHandler); }
static void Main(string[] args) { string language = @"eng"; using (var api = new TessBaseAPI(tessdata, language)) { api.Process(image); string text = api.GetUTF8Text(); } Console.WriteLine("Done..."); Console.ReadKey(); }
public static string OcrProcess(string image, string language = "eng") { //training data string tessdataPath = ConfigurationManager.AppSettings["TessdataPath"]; string text; TessBaseAPI tEngine = new TessBaseAPI(tessdataPath, language, OcrEngineMode.DEFAULT); tEngine.Process(image); text = tEngine.GetUTF8Text().ToString(); tEngine.Clear(); tEngine.Dispose(); return(text); }
private List <string> run_tessract() { List <string> re = new List <string>(); string dataPath = "./tessdata/"; string language = 1 != 1 ? "eng" : "jpn"; string inputFile = "./_tmp.bmp"; OcrEngineMode oem = OcrEngineMode.DEFAULT; PageSegmentationMode psm = PageSegmentationMode.AUTO_OSD; TessBaseAPI tessBaseAPI = new TessBaseAPI(); // Initialize tesseract-ocr if (!tessBaseAPI.Init(dataPath, language, oem)) { throw new Exception("Could not initialize tesseract."); } // Set the Page Segmentation mode tessBaseAPI.SetPageSegMode(psm); // Set the input image Pix pix = tessBaseAPI.SetImage(inputFile); tessBaseAPI.SetVariable("number", "1234567890"); // Recognize image tessBaseAPI.Recognize(); ResultIterator resultIterator = tessBaseAPI.GetIterator(); // extract text from result iterator StringBuilder stringBuilder = new StringBuilder(); PageIteratorLevel pageIteratorLevel = PageIteratorLevel.RIL_PARA; do { string str = resultIterator.GetUTF8Text(pageIteratorLevel); if (str != null) { str = Regex.Replace(str, @"\n", "\r\n"); re.Add(str); } } while (resultIterator.Next(pageIteratorLevel)); tessBaseAPI.Dispose(); pix.Dispose(); return(re); }
public TesseractOCR(Profile profile, params Type[] clients) : base(profile, clients) { try { TesseractImage = new TessBaseAPI(); Info("Tesseract library version is {0}.", TesseractImage.GetVersion()); Status = ApiStatus.Initializing; } catch (Exception e) { Error(e, "Could not load tesseract.net library."); Status = ApiStatus.LibraryError; } }
public void GetText(Bitmap bitmap = null) { TessBaseAPI api = new TessBaseAPI(); bool result = api.Init("/storage/emulated/0/DCIM/Facebook", "por"); BitmapFactory.Options options = new BitmapFactory.Options(); options.InSampleSize = 4; Bitmap bit = BitmapFactory.DecodeFile("/storage/emulated/0/DCIM/Facebook/joao.jpg"); api.SetImage(bit); String recognizedText = api.UTF8Text; txtView.Text = recognizedText; api.End(); }
private int RunTesseract(Mat img) { int conf = 0; using (TessBaseAPI engine = new TessBaseAPI(@".\tessdata", _lang, OcrEngineMode.TESSERACT_LSTM_COMBINED)) { engine.InitForAnalysePage(); engine.Init(null, _lang); engine.SetImage(new UIntPtr(BitConverter.ToUInt64(BitConverter.GetBytes(img.Data.ToInt64()), 0)), img.Size().Width, img.Size().Height, img.Channels(), (int)img.Step1()); engine.Recognize(); ResultIterator iterator = engine.GetIterator(); IterateFullPage(iterator, ref _textLines); iterator.Dispose(); conf = engine.MeanTextConf; } return(conf); }
static void example1() { string dataPath = "./tessdata/"; string language = "eng"; OcrEngineMode oem = OcrEngineMode.DEFAULT; PageSegmentationMode psm = PageSegmentationMode.AUTO_OSD; TessBaseAPI tessBaseAPI = new TessBaseAPI(); // Initialize tesseract-ocr if (!tessBaseAPI.Init(dataPath, language, oem)) { throw new Exception("Could not initialize tesseract."); } // Set the Page Segmentation mode tessBaseAPI.SetPageSegMode(psm); }
static void example4() { string dataPath = "./tessdata/"; string language = "eng"; string inputFile = "./input.png"; OcrEngineMode oem = OcrEngineMode.DEFAULT; PageSegmentationMode psm = PageSegmentationMode.AUTO_OSD; TessBaseAPI tessBaseAPI = new TessBaseAPI(); // Initialize tesseract-ocr if (!tessBaseAPI.Init(dataPath, language, oem)) { throw new Exception("Could not initialize tesseract."); } // Set the Page Segmentation mode tessBaseAPI.SetPageSegMode(psm); // Set the input image Pix pix = tessBaseAPI.SetImage(inputFile); // Recognize image tessBaseAPI.Recognize(); //ensure input name is set tessBaseAPI.SetInputName(inputFile); var fileInfo = new System.IO.FileInfo(inputFile); string tessDataPath = tessBaseAPI.GetDatapath(); string outputName = fileInfo.FullName.Replace(fileInfo.Extension, string.Empty); //input name.pdf // call pdf renderer and export pdf using (var pdfRenderer = new PdfRenderer(outputName, tessDataPath, false)) { pdfRenderer.BeginDocument("tesseract.net searchable Pdf generation"); pdfRenderer.AddImage(tessBaseAPI); pdfRenderer.EndDocument(); } tessBaseAPI.Dispose(); pix.Dispose(); }
private void ConvertImageToText() { try{ string dataPath = "./tessdata"; string language = "eng"; string inputFile = "./imageSaved.bmp"; OcrEngineMode oem = OcrEngineMode.DEFAULT; PageSegmentationMode psm = PageSegmentationMode.AUTO_OSD; TessBaseAPI tessBaseAPI = new TessBaseAPI(); if (!tessBaseAPI.Init(dataPath, language, oem)) { throw new Exception("Could not initialize tesseract."); } // Set the Page Segmentation mode tessBaseAPI.SetPageSegMode(psm); // Set the input image tessBaseAPI.SetImage(inputFile); // Recognize image tessBaseAPI.Recognize(); ResultIterator resultIterator = tessBaseAPI.GetIterator(); // Extract text from result iterator StringBuilder stringBuilder = new StringBuilder(); PageIteratorLevel pageIteratorLevel = PageIteratorLevel.RIL_WORD;// RIL_PARA; do { stringBuilder.Append(resultIterator.GetUTF8Text(pageIteratorLevel) + " "); } while (resultIterator.Next(pageIteratorLevel)); tessBaseAPI.Dispose(); textParsed = stringBuilder.ToString().Trim(); //textParsedBox.Text = stringBuilder.ToString().Trim(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
async void TakePhotoButtonTapped(object sender, EventArgs e) { camera.StopPreview(); var image = textureView.Bitmap; image = Android.Graphics.Bitmap.CreateBitmap(image, (int)OCR_Rectangle.GetX(), (int)OCR_Rectangle.GetY(), 600, 200); image = ToGrayScale(image); try { var absolutePath = Android.OS.Environment.GetExternalStoragePublicDirectory(Android.OS.Environment.DirectoryDcim).AbsolutePath; var folderPath = absolutePath + "/Camera"; filePath = System.IO.Path.Combine(folderPath, string.Format("photo_{0}.jpg", Guid.NewGuid())); String recognizedText = "???"; TessBaseAPI baseApi = new TessBaseAPI(); baseApi.Init(absolutePath, "eng"); baseApi.SetImage(image); recognizedText = baseApi.UTF8Text; OCR_textView.Text = "OCR :" + recognizedText; var fileStream = new FileStream(filePath, FileMode.Create); await image.CompressAsync(Android.Graphics.Bitmap.CompressFormat.Jpeg, 50, fileStream); fileStream.Close(); image.Recycle(); var intent = new Android.Content.Intent(Android.Content.Intent.ActionMediaScannerScanFile); var file = new Java.IO.File(filePath); var uri = Android.Net.Uri.FromFile(file); intent.SetData(uri); MainActivity.Instance.SendBroadcast(intent); } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(@" ", ex.Message); } camera.StartPreview(); }
static void example3() { string dataPath = "./tessdata/"; string language = "eng"; string inputFile = "./input.png"; OcrEngineMode oem = OcrEngineMode.DEFAULT; PageSegmentationMode psm = PageSegmentationMode.AUTO_OSD; TessBaseAPI tessBaseAPI = new TessBaseAPI(); // Initialize tesseract-ocr if (!tessBaseAPI.Init(dataPath, language, oem)) { throw new Exception("Could not initialize tesseract."); } // Set the Page Segmentation mode tessBaseAPI.SetPageSegMode(psm); // Set the input image Pix pix = tessBaseAPI.SetImage(inputFile); // Recognize image tessBaseAPI.Recognize(); ResultIterator resultIterator = tessBaseAPI.GetIterator(); // extract text from result iterator StringBuilder stringBuilder = new StringBuilder(); PageIteratorLevel pageIteratorLevel = PageIteratorLevel.RIL_PARA; do { stringBuilder.Append(resultIterator.GetUTF8Text(pageIteratorLevel)); } while (resultIterator.Next(pageIteratorLevel)); tessBaseAPI.Dispose(); pix.Dispose(); }
//public static void clearFaceFlag() { faceFlag = 0; } public string RecognizeText(int id) { DBService dbs = new DBService(); Document doc = dbs.FindDocumentById(id); Image <Gray, Byte> img = scale(doc); //var image = PixConverter.ToPix(img.ToBitmap())) Tesseract.Native.DllImports.TesseractDirectory = System.Web.HttpContext.Current.Server.MapPath("~/Tesseract/bin/Debug/DLLS/"); TessBaseAPI tessBaseAPI = new TessBaseAPI(); System.Diagnostics.Debug.WriteLine("The current version is {0}", tessBaseAPI.GetVersion()); string dataPath = System.Web.HttpContext.Current.Server.MapPath("~/tessdata/"); string language = "eng"; string inputFile = doc.Path; OcrEngineMode oem = OcrEngineMode.DEFAULT; //OcrEngineMode oem = OcrEngineMode.DEFAULT; PageSegmentationMode psm = PageSegmentationMode.AUTO_OSD; // Initialize tesseract-ocr if (!tessBaseAPI.Init(dataPath, language, oem)) { throw new Exception("Could not initialize tesseract."); } // Set the Page Segmentation mode tessBaseAPI.SetPageSegMode(psm); // Set the input image Pix pix = tessBaseAPI.SetImage(inputFile); // Recognize image tessBaseAPI.Recognize(); ResultIterator resultIterator = tessBaseAPI.GetIterator(); // extract text from result iterator StringBuilder stringBuilder = new StringBuilder(); int top, bottom, left, right, i = 0; List <OCRText> forJson = new List <OCRText>(); PageIteratorLevel pageIteratorLevel = PageIteratorLevel.RIL_TEXTLINE; do { string textContent = resultIterator.GetUTF8Text(pageIteratorLevel); resultIterator.BoundingBox(pageIteratorLevel, out left, out top, out right, out bottom); string coordsString = "" + left + "," + top + "," + right + "," + bottom; forJson.Add(new OCRText() { Coords = coordsString, Text = textContent }); } while (resultIterator.Next(pageIteratorLevel)); tessBaseAPI.Dispose(); pix.Dispose(); var textForReturn = JsonConvert.SerializeObject(forJson); dbs.UpdateDocument(textForReturn, id); if (HasFace(img) == true) { FaceFlag = 1; } else { FaceFlag = 0; } return(textForReturn); }
public void /*Image*/ GetTextFromImage(IWebElement element, string uniqueName) { Screenshot screenshot = ((ITakesScreenshot)Driver).GetScreenshot(); string pth = Assembly.GetCallingAssembly().CodeBase; string finalpth = pth.Substring(0, pth.LastIndexOf("bin")) + "Screenshots/" + uniqueName + ".jpeg"; string localpath = new Uri(finalpth).LocalPath; screenshot.SaveAsFile(localpath, ScreenshotImageFormat.Jpeg); Image img = Image.FromFile(localpath /*uniqueName*/); Rectangle rect = new Rectangle(); if (element != null) { // Get the Width and Height of the WebElement using int width = element.Size.Width; int height = element.Size.Height; // Get the Location of WebElement in a Point. // This will provide X & Y co-ordinates of the WebElement Point p = element.Location; // Create a rectangle using Width, Height and element location rect = new Rectangle(p.X, p.Y, width, height); } //croping the image based on rect. Bitmap bmpImage = new Bitmap(img); var cropedImag = bmpImage.Clone(rect, bmpImage.PixelFormat); string dataPath = @"C:\Betsold\AutomationTesting\Tests\testdata\"; string language = "eng"; string imgPath = @"C:\Betsold\AutomationTesting\Tests\Screenshots\logo-test.jpeg"; OcrEngineMode oem = OcrEngineMode.LSTM_ONLY; PageSegmentationMode psm = PageSegmentationMode.AUTO; TessBaseAPI tessBaseAPI = new TessBaseAPI(dataPath, language, oem, psm); // Set the input image tessBaseAPI.SetImage(imgPath); var processedImage = tessBaseAPI.GetThresholdedImage(); processedImage.Write(@"C:\Users\ibozhinovski\Desktop\", ImageFileFormatTypes.IFF_JFIF_JPEG); // Recognize image tessBaseAPI.Recognize(); ResultIterator resultIterator = tessBaseAPI.GetIterator(); // Extract text from result iterator StringBuilder text = new StringBuilder(); PageIteratorLevel pageIteratorLevel = PageIteratorLevel.RIL_PARA; do { text.Append(resultIterator.GetUTF8Text(pageIteratorLevel)); } while (resultIterator.Next(pageIteratorLevel)); tessBaseAPI.Dispose(); Console.Read(); /* * // croping the image based on rect. * Bitmap bmpImage = new Bitmap(img); * var cropedImag = bmpImage.Clone(rect, bmpImage.PixelFormat); * * var ocr = new TesseractEngine("./testdata", "eng"); * * var page = ocr.Process(cropedImag); * * var result = page.GetText(); * * Console.WriteLine(result); */ }
public void TestInitialise() { api = new TessBaseAPI(tessdata, language); }
private void StartTrans() { string randomFileName = System.IO.Directory.GetCurrentDirectory() + "/captureImg.png"; CaptureImage(randomFileName); string dataPath = System.IO.Directory.GetCurrentDirectory(); string language = @"eng"; if (languageType == 0) { language = @"eng"; } else if (languageType == 1) { language = @"jpn"; } string textPicked; using (var api = new TessBaseAPI(dataPath, language)) { api.Process(randomFileName, true); textPicked = api.GetUTF8Text(); } if (textPicked != "") { string url = "https://openapi.naver.com/v1/papago/n2mt"; string query = textPicked; byte[] byteDataParams = Encoding.UTF8.GetBytes("source=en&target=ko&text=" + query); if (languageType == 0) { url = "https://openapi.naver.com/v1/papago/n2mt"; byteDataParams = Encoding.UTF8.GetBytes("source=en&target=ko&text=" + query); } else if (languageType == 1) { url = "https://openapi.naver.com/v1/language/translate"; byteDataParams = Encoding.UTF8.GetBytes("source=ja&target=ko&text=" + query); } HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); request.Headers.Add("X-Naver-Client-Id", "API KEY"); //API KEY request.Headers.Add("X-Naver-Client-Secret", "Secret Key"); //Sectret KEY request.Method = "POST"; request.ContentType = "application/x-www-form-urlencoded"; request.ContentLength = byteDataParams.Length; Stream st = request.GetRequestStream(); st.Write(byteDataParams, 0, byteDataParams.Length); st.Close(); try { HttpWebResponse response = (HttpWebResponse)request.GetResponse(); Stream stream = response.GetResponseStream(); StreamReader reader = new StreamReader(stream, Encoding.UTF8); string textTrans = reader.ReadToEnd(); stream.Close(); response.Close(); reader.Close(); JObject jo = JObject.Parse(textTrans); JToken idToken = jo["message"]["result"]["translatedText"]; String realText = (String)idToken; translatedText.Location = new Point(rectSourceX, rectDestY); translatedText.Text = realText; translatedText.Visible = true; } catch { translatedText.Visible = true; translatedText.Location = new Point(rectSourceX, rectDestY); translatedText.Text = "번역할 언어가 없습니다. 다시 선택하세요-번역 에러"; } } else { translatedText.Visible = true; translatedText.Location = new Point(rectSourceX, rectDestY); translatedText.Text = "번역할 언어가 없습니다. 다시 선택하세요-인식 에러"; } }
public void GetVersionTest() { TessBaseAPI tessBaseAPI = new TessBaseAPI(); Assert.AreEqual("4.00.00alpha", tessBaseAPI.GetVersion()); }
public new void KeyDown(KeyboardHookEventArgs e) { // Use Singleton design to store location information PartLocation currentLocation = PartLocation._instance; // Print Screen key was pressed if (e.Key == Keys.PrintScreen) { // Grab image from screen and convert to black and white using a threshold PrintScreenThreshold(); // Process text from image try { string dataPath = @"./tessdata"; string language = "eng"; string inputFile = "rewards.jpg"; OcrEngineMode oem = OcrEngineMode.DEFAULT; PageSegmentationMode psm = PageSegmentationMode.SINGLE_LINE; TessBaseAPI tessBaseAPI = new TessBaseAPI(); // Initialize tesseract-ocr if (!tessBaseAPI.Init(dataPath, language, oem)) { throw new Exception("Could not initialize tesseract"); } // Set the Page Segmentation mode tessBaseAPI.SetPageSegMode(psm); // Warframe Relics are displayed using A-Z, a-z, and & tessBaseAPI.SetVariable("tessedit_char_whitelist", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz&"); // Set input file Pix pix = tessBaseAPI.SetImage(inputFile); TB_Part1.Text = GetText(tessBaseAPI, currentLocation.PartLoc1, 580); TB_Part2.Text = GetText(tessBaseAPI, currentLocation.PartLoc2, 580); if (currentLocation.NumPeople >= 3) { TB_Part3.Text = GetText(tessBaseAPI, currentLocation.PartLoc3, 580); } if (currentLocation.NumPeople == 4) { TB_Part4.Text = GetText(tessBaseAPI, currentLocation.PartLoc4, 580); } tessBaseAPI.Dispose(); pix.Dispose(); // Grab latest order list for parts // TODO: Try multiple threads! If that's too fast, cache prices for a duration using (var client = new WebClient()) { GetPriceJson(client, TB_Part1, TB_Plat1); GetPriceJson(client, TB_Part2, TB_Plat2); if (currentLocation.NumPeople >= 3) { GetPriceJson(client, TB_Part3, TB_Plat3); } if (currentLocation.NumPeople == 4) { GetPriceJson(client, TB_Part4, TB_Plat4); } // These get cached GetDucatsJson(client, TB_Part1, TB_Ducats1); GetDucatsJson(client, TB_Part2, TB_Ducats2); if (currentLocation.NumPeople >= 3) { GetDucatsJson(client, TB_Part3, TB_Ducats3); } if (currentLocation.NumPeople == 4) { GetDucatsJson(client, TB_Part4, TB_Ducats4); } } List <PartWorth> sortPartWorth = new List <PartWorth>(); sortPartWorth.Add(new PartWorth(TB_Part1, TB_Ducats1)); sortPartWorth.Add(new PartWorth(TB_Part2, TB_Ducats2)); if (currentLocation.NumPeople >= 3) { sortPartWorth.Add(new PartWorth(TB_Part3, TB_Ducats3)); } if (currentLocation.NumPeople == 4) { sortPartWorth.Add(new PartWorth(TB_Part4, TB_Ducats4)); } // Sort by Plat, then Ducats sortPartWorth = sortPartWorth.OrderByDescending(o => Int32.Parse(o.platinum.Tag.ToString())).ThenByDescending(o => Int32.Parse(o.ducats.Tag.ToString())).ToList(); // If max Plat is low, sort by the reverse if (Int32.Parse(sortPartWorth[0].platinum.Tag.ToString()) < 15) { sortPartWorth = sortPartWorth.OrderByDescending(o => Int32.Parse(o.ducats.Tag.ToString())).ThenByDescending(o => Int32.Parse(o.platinum.Tag.ToString())).ToList(); } // Show best option TB_Pick.Text = sortPartWorth[0].platinum.Text; // Show current amount of Plat (and Ducats) made in the current session if (Int32.Parse(sortPartWorth[0].platinum.Tag.ToString()) != -1) { //GlobalVar.PLAT += Int32.Parse(platDuc[0].plat.Tag.ToString()); LB_Plat.Tag = Int32.Parse(LB_Plat.Tag.ToString()) + Int32.Parse(sortPartWorth[0].platinum.Tag.ToString()); } if (Int32.Parse(sortPartWorth[0].ducats.Tag.ToString()) != -1) { //GlobalVar.DUCATS += Int32.Parse(platDuc[0].ducats.Tag.ToString()); LB_Ducs.Tag = Int32.Parse(LB_Ducs.Tag.ToString()) + Int32.Parse(sortPartWorth[0].ducats.Tag.ToString()); } LB_Plat.Text = LB_Plat.Tag.ToString() + " p"; LB_Ducs.Text = LB_Ducs.Tag.ToString() + " d"; } catch (Exception ex) { LogError("KeyDown: " + ex.Message); } } else if (e.Key == Keys.NumPad2) { Debug.WriteLine("Switched to 2 people"); ClearBox(); VisibleRow(false, LB_Part3, TB_Part3, TB_Plat3, TB_Ducats3); VisibleRow(false, LB_Part4, TB_Part4, TB_Plat4, TB_Ducats4); currentLocation.SetPeople2(); } else if (e.Key == Keys.NumPad3) { Debug.WriteLine("Switched to 3 people"); ClearBox(); VisibleRow(true, LB_Part3, TB_Part3, TB_Plat3, TB_Ducats3); VisibleRow(false, LB_Part4, TB_Part4, TB_Plat4, TB_Ducats4); currentLocation.SetPeople3(); } else if (e.Key == Keys.NumPad4) { Debug.WriteLine("Switched to 4 people"); ClearBox(); VisibleRow(true, LB_Part3, TB_Part3, TB_Plat3, TB_Ducats3); VisibleRow(true, LB_Part4, TB_Part4, TB_Plat4, TB_Ducats4); currentLocation.SetPeople4(); } else if (e.Key == Keys.Pause) { Environment.Exit(0); } }
public void Dispose () { if (_api != null) { _api.Dispose (); _api = null; } }
public void OnProgressValues (TessBaseAPI.ProgressValues progress) { OnProgress (progress.Percent); }