# DriverPositionWindow.cs ``` cs /// Author : Maxime Rohmer /// Date : 08/05/2023 /// File : DriverPosition.cs /// Brief : Window containing infos about the position of a driver. /// Version : 0.1 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Drawing; namespace Test_Merge { public class DriverPositionWindow:Window { public DriverPositionWindow(Bitmap image, Rectangle bounds, bool generateEngine = true) : base(image, bounds,generateEngine) { Name = "Position"; } /// /// Decodes the position number using Tesseract OCR /// /// The position of the pilot in int public override async Task DecodePng() { string ocrResult = await GetStringFromPng(WindowImage, Engine, "0123456789"); int position; try { position = Convert.ToInt32(ocrResult); } catch { position = -1; } return position; } } } ```