- tweak: Search think

This commit is contained in:
2024-12-27 08:22:17 +03:00
parent 516801840c
commit ba687e51d6
19 changed files with 372 additions and 245 deletions

View File

@@ -0,0 +1,28 @@
using System;
using System.Windows.Input;
using Nebula.Launcher.ViewModels;
namespace Nebula.Launcher.Utils;
public class DelegateCommand<T> : ICommand
{
private readonly Action<T> _func;
public readonly Ref<T> TRef = new();
public DelegateCommand(Action<T> func)
{
_func = func;
}
public bool CanExecute(object? parameter)
{
return true;
}
public void Execute(object? parameter)
{
_func(TRef.Value);
}
public event EventHandler? CanExecuteChanged;
}

View File

@@ -0,0 +1,6 @@
namespace Nebula.Launcher.Utils;
public class Ref<T>
{
public T Value = default!;
}