Now the images are correctly loaded but the OCR is still Fucked
This commit is contained in:
+22
-3
@@ -22,22 +22,41 @@ namespace Test_Merge
|
||||
{
|
||||
if(Emulator != null && Reader != null)
|
||||
{
|
||||
btnSettings.Enabled = false;
|
||||
btnUpdate.Enabled = false;
|
||||
|
||||
Bitmap screen = Emulator.Screenshot();
|
||||
screen.Save("SCREEEEEEEEN.png");
|
||||
Reader.ChangeImage(screen);
|
||||
pbxResult.Image = screen;
|
||||
tbxResult.Text = await Reader.Decode(Reader.MainZones,Reader.Drivers);
|
||||
|
||||
btnSettings.Enabled = true;
|
||||
btnUpdate.Enabled = true;
|
||||
}
|
||||
}
|
||||
private void btnSettings_Click(object sender, EventArgs e)
|
||||
private async void btnSettings_Click(object sender, EventArgs e)
|
||||
{
|
||||
Settings settingsForm = new Settings();
|
||||
settingsForm.ShowDialog();
|
||||
MessageBox.Show(settingsForm.GrandPrixUrl + Environment.NewLine + settingsForm.GrandPrixName + Environment.NewLine + settingsForm.GrandPrixYear);
|
||||
//MessageBox.Show(settingsForm.GrandPrixUrl + Environment.NewLine + settingsForm.GrandPrixName + Environment.NewLine + settingsForm.GrandPrixYear);
|
||||
Emulator = new F1TVEmulator(settingsForm.GrandPrixUrl);
|
||||
try
|
||||
{
|
||||
await Emulator.Start();
|
||||
Reader = new Reader(settingsForm.SelectedConfigFile,Emulator.Screenshot(),true);
|
||||
}
|
||||
catch
|
||||
{
|
||||
//Could not start the driver even with the new config
|
||||
MessageBox.Show("The config is wrong or incomplete please try again");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private async void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
string configFile = "./Presets/Clean_2023.json";
|
||||
string configFile = "./Presets/Clean_4K_2023.json";
|
||||
string gpUrl = "https://f1tv.formula1.com/detail/1000006688/2023-azerbaijan-grand-prix?action=play";
|
||||
|
||||
//Emulator = new F1TVEmulator(gpUrl);
|
||||
|
||||
Reference in New Issue
Block a user