yay
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ public class SettingsViewModel : ViewModelBase
|
||||
foreach (var module in Core.modulelist)
|
||||
{
|
||||
|
||||
|
||||
AddModule(module.Name);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user