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;
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ namespace Test_Merge
|
||||
// It does not matter if the feed is paused because when changing channel it autoplays
|
||||
actions.SendKeys(OpenQA.Selenium.Keys.Space).Perform();
|
||||
//Clicks on the settings Icon
|
||||
|
||||
|
||||
int settingsClickTries = 0;
|
||||
bool settingsClickSuccess = false;
|
||||
while (settingsClickTries < 100 && !settingsClickSuccess)
|
||||
@@ -230,7 +230,7 @@ namespace Test_Merge
|
||||
settingsClickTries++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!settingsClickSuccess)
|
||||
{
|
||||
Screenshot("ERROR105");
|
||||
@@ -286,7 +286,7 @@ namespace Test_Merge
|
||||
{
|
||||
//Screenshot scrsht = ((ITakesScreenshot)Driver).GetScreenshot();
|
||||
//profileriver.SetPreferencC:\Users\Moi\source\repos\Test_Merge\README.mde("layout.css.devPixelsPerPx", "1.0");
|
||||
|
||||
|
||||
//Screenshot scrsht = Driver.GetFullPageScreenshot();
|
||||
Screenshot scrsht = Driver.GetScreenshot();
|
||||
|
||||
@@ -309,7 +309,8 @@ namespace Test_Merge
|
||||
public void Stop()
|
||||
{
|
||||
Ready = false;
|
||||
Driver.Dispose();
|
||||
if (Driver != null)
|
||||
Driver.Dispose();
|
||||
}
|
||||
/// <summary>
|
||||
/// Resets the emulation
|
||||
@@ -317,7 +318,8 @@ namespace Test_Merge
|
||||
public void ResetDriver()
|
||||
{
|
||||
Ready = false;
|
||||
Driver.Dispose();
|
||||
if (Driver != null)
|
||||
Driver.Dispose();
|
||||
Driver = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -209,5 +209,10 @@ namespace Test_Merge
|
||||
if (tbxResult.Text != "")
|
||||
GpUrl = textBox1.Text;
|
||||
}
|
||||
public static void btnDriver_Click(object sender, EventArgs e)
|
||||
{
|
||||
//Happens when a driver button has been clicked
|
||||
MessageBox.Show((sender as Button).Name + " has been selected");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -275,6 +275,8 @@ namespace Test_Merge
|
||||
//Next there could be a Title Zone and TrackInfoZone
|
||||
}
|
||||
}
|
||||
//mainResults = mainResults.OrderBy(driver => driver.Position >= 0).ThenBy(driver => driver.Position).ToList();
|
||||
mainResults = mainResults.OrderBy(driver => driver.Position).ToList();
|
||||
return mainResults;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user