Added further customization

This commit is contained in:
2023-05-25 10:49:45 +02:00
parent 398466c671
commit 5a6ca35334
7 changed files with 169 additions and 101 deletions
+23 -8
View File
@@ -63,7 +63,8 @@ namespace Test_Merge
}
else
{
MessageBox.Show("There is no URL for the Grand Prix you want to decode. Please return to the config and add a valid one");
//WE dont care anymore, the user will choose its Grand Prix himself in the main program
//MessageBox.Show("There is no URL for the Grand Prix you want to decode. Please return to the config and add a valid one");
}
}
@@ -73,7 +74,16 @@ namespace Test_Merge
ConfigFile = "./Presets/Clean_4K_2023.json";
GpUrl = "https://f1tv.formula1.com/detail/1000006688/2023-azerbaijan-grand-prix?action=play";
textBox1.Text = GpUrl;
tbxGpUrl.Text = GpUrl;
tip1.SetToolTip(btnResetEmulator, "Starts or restarts the emulator. You need to start this to use the app");
tip1.SetToolTip(btnSettings, "Opens the configuration menu");
tip1.SetToolTip(tbxGpUrl, "Insert the URL of the Grand Prix you want to track. Dont forget the \"?action=play\" at the end");
tip1.SetToolTip(lsbPresets, "Select a configuration preset to use with the decoding");
tip1.SetToolTip(pbxResult,"A preview of what the program sees. You should see the DATA page of the F1TV here");
tip1.SetToolTip(lsbOvertakes,"A list of all the activity. You can scroll to see the most recent overtakes");
tip1.SetToolTip(gpbxBattles,"The four first battles in the field. A battle is two drivers less than 3 seconds apart");
tip1.SetToolTip(gpbxLapTimes,"The fastest and slowest drivers on track at the moment. It takes the average lapTime of the last 5 laps to choose who is the fastes or the slowest");
RefreshUI();
}
@@ -141,11 +151,11 @@ namespace Test_Merge
}
private void DisplayBattles()
{
Wrapper.DisplayBattles(pnlBattles,this);
Wrapper.DisplayBattles(pnlBattles, this);
}
private void DisplayDeltas()
{
Wrapper.DisplayTimesDeltas(pnlFastest,pnlSlowest,this);
Wrapper.DisplayTimesDeltas(pnlFastest, pnlSlowest, this);
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
@@ -237,8 +247,8 @@ namespace Test_Merge
private void textBox1_TextChanged(object sender, EventArgs e)
{
if (textBox1.Text != "")
GpUrl = textBox1.Text;
if (tbxGpUrl.Text != "")
GpUrl = tbxGpUrl.Text;
}
public void btnDriver_Click(object sender, EventArgs e)
{
@@ -246,7 +256,7 @@ namespace Test_Merge
//MessageBox.Show((sender as Button).Name + " has been selected");
Button btn = (sender as Button);
string[] parts = btn.Name.Split('_');
DriverData driver = Wrapper.GetFullDriverData(parts[0], pnlCurrentDriverLapsHistory,this);
DriverData driver = Wrapper.GetFullDriverData(parts[0], pnlCurrentDriverLapsHistory, this);
lblCurrentDriverName.Text = driver.Name;
lblCurrentDriverPosition.Text = driver.Position.ToString();
lblCurrentDriverGapToLeader.Text = Reader.ConvertMsToTime(driver.GapToLeader);
@@ -295,7 +305,12 @@ namespace Test_Merge
//Happens when a lapTime has been clicked
Button btn = sender as Button;
string[] parts = btn.Name.Split('_');
Wrapper.DisplayLapTimeInfos(parts[0], Convert.ToInt32(parts[1]),btn.Text);
Wrapper.DisplayLapTimeInfos(parts[0], Convert.ToInt32(parts[1]), btn.Text);
}
private void Main_Resize(object sender, EventArgs e)
{
}
}
}