using System; using System.Windows.Input; namespace EveryPublish.Client.Services; /// 极简 ICommand 实现(托盘命令用,免 CommunityToolkit 依赖) public class SimpleCommand : ICommand { private readonly Action _action; public SimpleCommand(Action action) { _action = action; } public event EventHandler? CanExecuteChanged { add { } remove { } } public bool CanExecute(object? parameter) => true; public void Execute(object? parameter) => _action(); }