Fixed the slowest drivers windows and cleaned some of the code

This commit is contained in:
2023-05-30 09:38:51 +02:00
parent 6f36c829c2
commit 067e7233a0
16 changed files with 221 additions and 70 deletions
+6 -7
View File
@@ -1,8 +1,8 @@
/// Author : Maxime Rohmer
/// Date : 08/05/2023
/// Date : 30/05/2023
/// File : DriverNameWindow
/// Brief : Window containing infos about the name of the driver
/// Version : 0.1
/// Version : Alpha 1.0
using System;
using System.Collections.Generic;
@@ -15,7 +15,6 @@ namespace Test_Merge
{
public class DriverNameWindow : Window
{
public static Random rnd = new Random();
public DriverNameWindow(Bitmap image, Rectangle bounds, bool generateEngine = true) : base(image, bounds,generateEngine)
{
Name = "Name";
@@ -23,8 +22,8 @@ namespace Test_Merge
/// <summary>
/// Decodes using OCR wich driver name is in the image
/// </summary>
/// <param name="DriverList"></param>
/// <returns>The driver name in string</returns>
/// <param name="DriverList">A list of all the names that can be on the image</param>
/// <returns>a string representing the found driver name. It will be one of the ones given in the list</returns>
public override object DecodePng(List<string> DriverList)
{
string result = "";
@@ -40,8 +39,8 @@ namespace Test_Merge
/// <summary>
/// Verifies that the name found in the OCR is a valid name
/// </summary>
/// <param name="driverList"></param>
/// <param name="potentialDriver"></param>
/// <param name="driverList">The list of all the drivers name that can be found in the image</param>
/// <param name="potentialDriver">The driver you want to be sure if it exists or not</param>
/// <returns>If ye or no the driver exists</returns>
private static bool IsADriver(List<string> driverList, string potentialDriver)
{