This commit is contained in:
2026-03-20 21:10:28 +02:00
parent ac183f8eb6
commit 78e2483e7f
8 changed files with 84 additions and 25 deletions

View File

@@ -8,7 +8,31 @@ public class Selector
{
if (text.Contains("вижен"))
{
Console.WriteLine("dddddd");
string novision = text.Replace("вижен", "").Trim();
foreach (var module in Core.modulelist)
{
foreach (var command in module.commands)
{
if (command.Contains("*"))
{
string wopo = command.Replace("*", "").Trim();
if (novision.Contains(wopo))
{
Console.WriteLine(module.Module.Execute(command));
break;
}
}
else
{
if (command == novision)
{
Console.WriteLine(module.Module.Execute(novision));
break;
}
}
}
}
}
}
}

View File

@@ -172,7 +172,7 @@ public class TrigerCore : IDisposable
string text = el.GetString() ?? "";
if (!string.IsNullOrWhiteSpace(text))
{
RecognizedText += text + " ";
RecognizedText = text;
// Безопасный проброс в UI поток Avalonia
Dispatcher.UIThread.Post(() => OnRecognized?.Invoke(text));
}