完善功能

This commit is contained in:
2025-09-22 14:30:54 +08:00
parent fde5919d99
commit 365cd2397a
31 changed files with 1849 additions and 467 deletions

View File

@@ -0,0 +1,57 @@
using System;
using System.Windows.Input;
namespace .Base
{
public class DelegateCommand : ICommand
{
public Action<object> ExecuteCommand = null;
public event EventHandler CanExecuteChanged;
public DelegateCommand(DelegateCommand focusAdjustToCommand)
{
}
public DelegateCommand(Action<object> Command)
{
ExecuteCommand = Command;
}
public bool CanExecute(object paramter)
{
return true;
}
public void Execute(object paramter)
{
ExecuteCommand?.Invoke(paramter);
}
}
public class DelegateCommand<T> : ICommand
{
public Action<T> ExecuteCommand = null;
public event EventHandler CanExecuteChanged;
public DelegateCommand()
{
}
public DelegateCommand(Action<T> Command)
{
ExecuteCommand = Command;
}
public bool CanExecute(object paramter)
{
return true;
}
public void Execute(object paramter)
{
ExecuteCommand?.Invoke((T)paramter);
}
}
}