Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DelegateCommand"/> class.
 /// </summary>
 /// <param name="exec">The execute method</param>
 /// <param name="canExecutePredicate">Predicate Function without object parameter</param>
 public DelegateCommand(ExecuteMethodWithParameter exec, Func <bool> canExecutePredicate)
     : this(exec)
 {
     canExecute = (obj) =>
     {
         return(canExecutePredicate.Invoke());
     };
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DelegateCommand"/> class.
 /// </summary>
 /// <param name="exec">The execute method that takes a parameter</param>
 /// <param name="canExecutePredicate">Predicate Function with object parameter</param>
 public DelegateCommand(ExecuteMethodWithParameter exec, Func <object, bool> canExecutePredicate)
     : this(exec)
 {
     canExecute = canExecutePredicate;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DelegateCommand"/> class.
 /// </summary>
 /// <param name="exec">The execute method that takes a parameter</param>
 public DelegateCommand(ExecuteMethodWithParameter exec)
 {
     executeMethodWithParam = exec;
 }