• MobileTests.cs
- Pre test now checks firmware and adds the label dynamically to the panel • AiQ_GUI.Designer.cs - Added CbBxCameraModel.SelectedIndexChanged to properly wire UI element. • Microsoft/StatsExcel.cs - Improved workbook loading error handling to distinguish between corruption and file access issues.
This commit is contained in:
37
AiQ_GUI.cs
37
AiQ_GUI.cs
@@ -99,6 +99,7 @@ namespace AiQ_GUI
|
||||
|
||||
await CheckHWOnline;
|
||||
Flags.Start = false;
|
||||
CbBxCamType.Text = "AiQ"; // Default to AiQ cameras
|
||||
|
||||
}
|
||||
|
||||
@@ -139,7 +140,6 @@ namespace AiQ_GUI
|
||||
CbBxCameraModel.Items.AddRange(models);
|
||||
}
|
||||
|
||||
|
||||
private void PopulateUIWithLDS(LocalDataStore lds)
|
||||
{
|
||||
CbBxUserName.Text = lds.User;
|
||||
@@ -202,7 +202,7 @@ namespace AiQ_GUI
|
||||
}
|
||||
else if (CbBxCamType.Text == "Mobile")
|
||||
{
|
||||
|
||||
await MobilePreTest.RunPreTestAsync();
|
||||
await PreTestPassed();
|
||||
}
|
||||
}
|
||||
@@ -672,7 +672,7 @@ namespace AiQ_GUI
|
||||
}
|
||||
|
||||
|
||||
private void CbBxCamTypSelectedIndexChanged(object sender, EventArgs e)
|
||||
private void CbBxCameraModel_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
TestStartConditions();
|
||||
}
|
||||
@@ -1434,34 +1434,9 @@ namespace AiQ_GUI
|
||||
{
|
||||
Stopwatch stopWatchTest = Stopwatch.StartNew();
|
||||
|
||||
|
||||
await MobilePreTest.CheckFirmwareAsync();
|
||||
//AddLabelToPanel("Test Complete", false);
|
||||
//FakeCamera fakeCamera = new FakeCamera(80); // Create an instance of FakeCamera
|
||||
|
||||
//CamOnTest.IP = CbBxFoundCams.Text;
|
||||
//_ = fakeCamera.StartAsync(CAMTYPE.GOOD).ContinueWith(task =>
|
||||
//{
|
||||
// //Network.Initialize("developer", "Pass123");
|
||||
|
||||
// if (task.IsFaulted)
|
||||
// {
|
||||
// AddToActionsList("Error starting FakeCamera: " + task.Exception?.Message);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// AddToActionsList($"FakeCamera started successfully. IP: {fakeCamera}");
|
||||
// }
|
||||
//});
|
||||
|
||||
//await Task.Delay(3000); // Wait for server to start
|
||||
//CbBxFoundCams.Text = "localhost"; // Should force update in creds an network reinit
|
||||
//CmBoFoundCams_TextChanged(sender, e);
|
||||
//CbBxCameraModel.SelectedIndex = CbBxCameraModel.Items.Count - 1; // Selects AB12CD as model number
|
||||
|
||||
//await Task.Delay(3000); // Wait for server to start
|
||||
|
||||
//BtnStartTest_Click(sender, e);
|
||||
//StatsExcel excelExporter = new();
|
||||
//excelExporter.ExportDatabaseToExcel();
|
||||
//await MobilePreTest.CheckFirmwareAsync();
|
||||
|
||||
AddToActionsList("RunTime " + stopWatchTest.Elapsed.ToString(@"hh\:mm\:ss\.ff"), Level.LOG);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user