38 lines
973 B
Markdown
38 lines
973 B
Markdown
# DriverLapTimeWindow.cs
|
|
|
|
``` cs
|
|
/// Author : Maxime Rohmer
|
|
/// Date : 30/05/2023
|
|
/// File : DriverLapTimeWindow
|
|
/// Brief : Window containing infos about the lap time of a driver
|
|
/// Version : Alpha 1.0
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Drawing;
|
|
|
|
namespace TrackTrends
|
|
{
|
|
public class DriverLapTimeWindow:Window
|
|
{
|
|
public DriverLapTimeWindow(Bitmap image, Rectangle bounds, bool generateEngine = true) : base(image, bounds,generateEngine)
|
|
{
|
|
Name = "LapTime";
|
|
}
|
|
/// <summary>
|
|
/// Decodes the lap time contained in the image using OCR Tesseract
|
|
/// </summary>
|
|
/// <returns>The laptime in int (ms)</returns>
|
|
public override object DecodePng()
|
|
{
|
|
int result = GetTimeFromPng(WindowImage, OcrImage.WindowType.LapTime, Engine);
|
|
return result;
|
|
}
|
|
}
|
|
}
|
|
|
|
```
|