Now the OCR applies and only crashes sometimes. But its complete trash and the images cant change for whatever reason
This commit is contained in:
+30
-2
@@ -11,17 +11,45 @@ using System.Windows.Forms;
|
||||
namespace Test_Merge
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
{
|
||||
Reader Reader = null;
|
||||
F1TVEmulator Emulator = null;
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public async void RefreshUI()
|
||||
{
|
||||
if(Emulator != null && Reader != null)
|
||||
{
|
||||
Bitmap screen = Emulator.Screenshot();
|
||||
screen.Save("SCREEEEEEEEN.png");
|
||||
Reader.ChangeImage(screen);
|
||||
tbxResult.Text = await Reader.Decode(Reader.MainZones,Reader.Drivers,screen);
|
||||
}
|
||||
}
|
||||
private 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);
|
||||
}
|
||||
|
||||
private async void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
string configFile = "./Presets/Clean_2023.json";
|
||||
string gpUrl = "https://f1tv.formula1.com/detail/1000006688/2023-azerbaijan-grand-prix?action=play";
|
||||
|
||||
Emulator = new F1TVEmulator(gpUrl);
|
||||
await Emulator.Start();
|
||||
Reader = new Reader(configFile,Emulator.Screenshot(),true);
|
||||
}
|
||||
|
||||
private void btnUpdate_Click(object sender, EventArgs e)
|
||||
{
|
||||
btnUpdate.Enabled = false;
|
||||
RefreshUI();
|
||||
btnUpdate.Enabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user