This commit is contained in:
meelstorm
2025-11-10 11:49:51 +01:00
parent 745a15b162
commit 0ee132788d
9 changed files with 168 additions and 89 deletions

View File

@@ -69,6 +69,20 @@ namespace Hawkeye.VisionBuilder.Features.ImageStatistics
//treeView.ExpandAll();
}
public void AddExpected(string filePath, string[]? defects)
{
// get folder name as expected defect
string expectedDefect = System.IO.Path.GetFileName(System.IO.Path.GetDirectoryName(filePath) ?? string.Empty) ?? string.Empty;
if (defects.Contains(expectedDefect, StringComparer.OrdinalIgnoreCase))
{
AddGoodImage(filePath);
}
else
{
AddBadImage(filePath, [expectedDefect]);
}
}
private void UpdateBranchText(TreeNode node, string name)
{
if (node == _badNode)