recipe name filter
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user