Made UI tweaks

This commit is contained in:
2023-05-24 08:43:03 +02:00
parent 42858f847d
commit 5c6e3c5b2b
4 changed files with 33 additions and 6 deletions
+19 -1
View File
@@ -48,8 +48,26 @@ namespace Test_Merge
newButton.Size = buttonDimensions;
newButton.Location = new Point(0,driverCount * buttonDimensions.Height);
newButton.Text = liveData[driverCount].Name;
DriverData driver = liveData[driverCount];
if (driver.Position == -1)
{
//Its a DNF
newButton.Enabled = false;
}
if(driver.Position > 1)
{
newButton.Text = driver.Name + " +" + Reader.ConvertMsToTime(driver.GapToLeader);
}
else
{
newButton.Text = driver.Name;
}
newButton.Name = liveData[driverCount].Name;
newButton.TextAlign = ContentAlignment.MiddleLeft;
newButton.Click += Form1.btnDriver_Click;
buttons[driverCount] = newButton;
}