Deactivated all the OCR methods to rework them

This commit is contained in:
2023-05-12 08:24:16 +02:00
parent 6d2d2e11a8
commit 592025e283
5 changed files with 79 additions and 13 deletions
+18 -9
View File
@@ -94,27 +94,36 @@ namespace Test_Merge
{
// A switch would be prettier but I dont think its supported in this C# version
if (w is DriverNameWindow)
result.Name = (string)await (w as DriverNameWindow).DecodePng(driverList);
//result.Name = (string)await (w as DriverNameWindow).DecodePng(driverList);
result.Name = "Unknown";
if (w is DriverDrsWindow)
result.DRS = (bool)await (w as DriverDrsWindow).DecodePng();
//result.DRS = (bool)await (w as DriverDrsWindow).DecodePng();
result.DRS = false;
if (w is DriverGapToLeaderWindow)
result.GapToLeader = (int)await (w as DriverGapToLeaderWindow).DecodePng();
//result.GapToLeader = (int)await (w as DriverGapToLeaderWindow).DecodePng();
result.GapToLeader = 0;
if (w is DriverLapTimeWindow)
result.LapTime = (int)await (w as DriverLapTimeWindow).DecodePng();
//result.LapTime = (int)await (w as DriverLapTimeWindow).DecodePng();
result.LapTime = 0;
if (w is DriverPositionWindow)
result.Position = (int)await (w as DriverPositionWindow).DecodePng();
//result.Position = (int)await (w as DriverPositionWindow).DecodePng();
result.Position = 0;
if (w is DriverSectorWindow)
{
sectorCount++;
if (sectorCount == 1)
result.Sector1 = (int)await (w as DriverSectorWindow).DecodePng();
//result.Sector1 = (int)await (w as DriverSectorWindow).DecodePng();
result.Sector1 = 0;
if (sectorCount == 2)
result.Sector2 = (int)await (w as DriverSectorWindow).DecodePng();
//result.Sector2 = (int)await (w as DriverSectorWindow).DecodePng();
result.Sector2 = 0;
if (sectorCount == 3)
result.Sector3 = (int)await (w as DriverSectorWindow).DecodePng();
//result.Sector3 = (int)await (w as DriverSectorWindow).DecodePng();
result.Sector3 = 0;
}
if (w is DriverTyresWindow)
result.CurrentTyre = (Tyre)await (w as DriverTyresWindow).DecodePng();
//result.CurrentTyre = (Tyre)await (w as DriverTyresWindow).DecodePng();
result.CurrentTyre = new Tyre(Tyre.Type.Undefined,0);
}
return result;
}