Some tweaks

This commit is contained in:
2023-05-23 18:03:41 +02:00
parent 7c189bc2d9
commit 42858f847d
2 changed files with 12 additions and 2 deletions

View File

@@ -38,8 +38,14 @@ namespace Test_Merge
}
private async void btnSettings_Click(object sender, EventArgs e)
{
if(Emulator != null)
Emulator.Stop();
if (Emulator != null)
Emulator.ResetDriver();
Emulator = null;
Wrapper = null;
GC.Collect();
Settings settingsForm = new Settings();
settingsForm.ShowDialog();
//MessageBox.Show(settingsForm.GrandPrixUrl + Environment.NewLine + settingsForm.GrandPrixName + Environment.NewLine + settingsForm.GrandPrixYear);
@@ -171,6 +177,8 @@ namespace Test_Merge
Emulator = null;
Wrapper = null;
GC.Collect();
Emulator = new F1TVEmulator(GpUrl);
errorCode = await Emulator.Start();
});

View File

@@ -359,6 +359,8 @@ namespace Test_Merge
{
Emulator.Stop();
}
Emulator = null;
GC.Collect();
}
private void btnResetDriver_Click(object sender, EventArgs e)