Made UI tweaks
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user