recipe name filter

This commit is contained in:
meelstorm
2025-07-28 09:52:29 +02:00
parent 71d59df0cd
commit f80b275ad8
58 changed files with 4066 additions and 79 deletions

View File

@@ -30,7 +30,7 @@ namespace VisionBuilder.UI.Recipes.HawkeyeRecipe
_loadingService.StartLoading($"Loading recipes for {_recognitionConfiguration.CameraName}...");
try
{
var files = WorkflowRecipeHelper.ListRecipeFiles();
var files = WorkflowRecipeHelper.ListRecipeFiles(_recognitionConfiguration.RecipeNameFilter);
List<RecipeData> recipes = new List<RecipeData>();
foreach (var file in files)
{
@@ -65,6 +65,7 @@ namespace VisionBuilder.UI.Recipes.HawkeyeRecipe
}
public bool IsRunning { get; set; }
public bool IsPaused { get; set; }
private DateTime _startTime;
private WorkflowList _workflow;
@@ -127,13 +128,27 @@ namespace VisionBuilder.UI.Recipes.HawkeyeRecipe
}
private void Loop(CancellationToken token)
public void Pause()
{
IsPaused= true;
}
public void Resume()
{
IsPaused = false;
}
private async Task Loop(CancellationToken token)
{
// Start the recognition process using the Hawkeye library
while (!token.IsCancellationRequested)
{
if (IsPaused)
{
await Task.Delay(100, token);
continue;
}
var sw = Stopwatch.StartNew();
_workflow.Context.CancellationToken= token;