1 // -----------------------------------------------------------------------
2 // <copyright file="PithosCommand.cs" company="Microsoft">
3 // TODO: Update copyright text.
5 // -----------------------------------------------------------------------
7 using System.Windows.Input;
9 namespace Pithos.Client.WPF
12 using System.Collections.Generic;
17 /// TODO: Update summary.
19 public class PithosCommand:ICommand
21 private Action _action;
22 private Func<bool> _condition;
24 public PithosCommand(Action execute,Func<bool> canExecute=null )
27 _condition = canExecute;
31 public void Execute(object parameter)
36 public bool CanExecute(object parameter)
38 if (_condition == null)
43 public event EventHandler CanExecuteChanged;