Prepare TunnelX for open-source release

This commit is contained in:
MaxFan
2026-05-11 16:27:14 +03:30
commit 3726d36902
108 changed files with 84390 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
using System.Windows.Input;
namespace AppTunnel.ViewModels;
public class RelayCommand : ICommand
{
private readonly Action<object?> _execute;
private readonly Predicate<object?>? _canExecute;
public RelayCommand(Action<object?> execute, Predicate<object?>? canExecute = null)
{
_execute = execute;
_canExecute = canExecute;
}
public bool CanExecute(object? parameter) => _canExecute?.Invoke(parameter) ?? true;
public void Execute(object? parameter) => _execute(parameter);
public event EventHandler? CanExecuteChanged
{
add => CommandManager.RequerySuggested += value;
remove => CommandManager.RequerySuggested -= value;
}
}