Beginning of the Implementing multple cameras into the AiQ GUI
Features added: - Onvif discoverable - New Camera Type combo box - Access has be changed to be more scalable and dynamic in preparation for more cameras
This commit is contained in:
@@ -19,7 +19,7 @@ namespace AiQ_GUI
|
||||
}
|
||||
catch (WebDriverTimeoutException)
|
||||
{
|
||||
MainForm.Instance.AddToActionsList($"Could not load web page {Level.ERROR}" + url + $"1. Check camera has no password set. {Level.ERROR}" + Environment.NewLine + $"2. If unable to fix speak to supervisor.{Level.ERROR}");
|
||||
MainForm.Instance.AddToActionsList($"Could not load web page " + url + $"1. Check camera has no password set. " + Environment.NewLine + $"2. If unable to fix speak to supervisor.", Level.ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,11 +71,11 @@ namespace AiQ_GUI
|
||||
|
||||
loginBtn.Click();
|
||||
|
||||
MainForm.Instance.AddToActionsList($"Switched user and logged in.{Level.Success}");
|
||||
MainForm.Instance.AddToActionsList($"Switched user and logged in.", Level.Success);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MainForm.Instance.AddToActionsList($"SwitchUser failed: {Level.ERROR}" + ex.Message);
|
||||
MainForm.Instance.AddToActionsList($"SwitchUser failed:" + ex.Message,Level.ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ namespace AiQ_GUI
|
||||
ClickElementByID(elementID, driver, false);
|
||||
}
|
||||
|
||||
MainForm.Instance.AddToActionsList($"Could not click {Level.WARNING}" + elementID);
|
||||
MainForm.Instance.AddToActionsList($"Could not click " + elementID, Level.WARNING);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ namespace AiQ_GUI
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MainForm.Instance.AddToActionsList($"Failed to create ChromeDriver: {Level.ERROR}" + ex.Message);
|
||||
MainForm.Instance.AddToActionsList($"Failed to create ChromeDriver: " + ex.Message, Level.ERROR);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace AiQ_GUI
|
||||
catch (Exception ex)
|
||||
{
|
||||
SoakError($"Initial connection failed: {ex.Message}", SoakLogFile, CamInfo.CheckBox);
|
||||
MainForm.Instance.AddToActionsList($"[{CamInfo.IP}] Initial connection failed: {Level.ERROR}{ex.Message}");
|
||||
MainForm.Instance.AddToActionsList($"[{CamInfo.IP}] Initial connection failed:{ex.Message}", Level.ERROR);
|
||||
|
||||
// Wait 10 seconds before trying again
|
||||
await Task.Delay(TimeSpan.FromSeconds(10), token);
|
||||
@@ -52,7 +52,7 @@ namespace AiQ_GUI
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
SoakError($"Failed to get element IDs: {Level.ERROR} {ex.Message}", SoakLogFile, CamInfo.CheckBox);
|
||||
SoakError($"Failed to get element IDs: {ex.Message}", SoakLogFile, CamInfo.CheckBox);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace AiQ_GUI
|
||||
// Retry ping until camera responds or cancelled
|
||||
while (!await Network.PingIP(CamInfo.IP) && !token.IsCancellationRequested)
|
||||
{
|
||||
SoakError($"Camera did not respond after restart.{Level.ERROR}", SoakLogFile, CamInfo.CheckBox);
|
||||
SoakError($"Camera did not respond after restart.", SoakLogFile, CamInfo.CheckBox);
|
||||
await Task.Delay(TimeSpan.FromMinutes(1), token); // Retry after delay of 1 minute
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ namespace AiQ_GUI
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
SoakError($"Error during power cycle: {Level.ERROR} {ex.Message}", SoakLogFile, CamInfo.CheckBox);
|
||||
SoakError($"Error during power cycle: {ex.Message}", SoakLogFile, CamInfo.CheckBox);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ namespace AiQ_GUI
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
SoakError($"ImageCheck failed: {Level.ERROR}{Level.ERROR} {ex.Message}", SoakLogFile, CamInfo.CheckBox);
|
||||
SoakError($"ImageCheck failed: {ex.Message}", SoakLogFile, CamInfo.CheckBox);
|
||||
}
|
||||
lastHour = currentHour;
|
||||
}
|
||||
@@ -131,7 +131,7 @@ namespace AiQ_GUI
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
SoakError($"ChangeRandomDropdown failed: {Level.WARNING} {ex.Message}", SoakLogFile, CamInfo.CheckBox);
|
||||
SoakError($"ChangeRandomDropdown failed: {ex.Message}", SoakLogFile, CamInfo.CheckBox);
|
||||
}
|
||||
|
||||
try
|
||||
@@ -200,7 +200,7 @@ namespace AiQ_GUI
|
||||
File.Delete(SoakTestPath);
|
||||
}
|
||||
else
|
||||
MainForm.Instance.AddToActionsList($"Failed to link or delete PDFs {Level.ERROR}");
|
||||
MainForm.Instance.AddToActionsList($"Failed to link or delete PDFs ", Level.ERROR);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -240,7 +240,7 @@ namespace AiQ_GUI
|
||||
if (ImageDark == null)
|
||||
{
|
||||
Logging.LogWarningMessage($"Dark image is null for {controlType} at setting {SettingMinMax[1]}", SoakLogFile);
|
||||
MainForm.Instance.AddToActionsList($"Dark image is null for {controlType} at setting {SettingMinMax[1]}{Level.WARNING}");
|
||||
MainForm.Instance.AddToActionsList($"Dark image is null for {controlType} at setting {SettingMinMax[1]}", Level.WARNING);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user