32 lines
667 B
C#
Executable File
32 lines
667 B
C#
Executable File
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Input;
|
|
|
|
namespace ksBroadcastingTestClient
|
|
{
|
|
public class KSRelayCommand : ICommand
|
|
{
|
|
private Action<object> action;
|
|
|
|
public KSRelayCommand(Action<object> action)
|
|
{
|
|
this.action = action;
|
|
}
|
|
|
|
public event EventHandler CanExecuteChanged;
|
|
|
|
public bool CanExecute(object parameter)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public void Execute(object parameter)
|
|
{
|
|
action(parameter);
|
|
}
|
|
}
|
|
}
|