using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Input; namespace Aitex.UI.Charting.Command { /// /// /// public class ChartingCommand : ICommand { public ChartingCommand(Predicate CanExecute , Action Execute) { _canExecute = CanExecute; _execute = Execute; } Predicate _canExecute; Action _execute; /// /// /// /// /// public bool CanExecute(object parameter) { if (_canExecute != null) return _canExecute.Invoke(parameter); return true; } #pragma warning disable 0067 public event EventHandler CanExecuteChanged; #pragma warning restore 0067 public void Execute(object parameter) { if (_execute != null) _execute.Invoke(parameter); } } }