Ejemplo n.º 1
0
 public WpfRelayUICommand(IRelayUICommandInfo info, Action execute, Func <bool> canExecute,
                          bool keepTargetAlive = false)
     : base(execute, canExecute, keepTargetAlive)
 {
     Text     = info.Text;
     Icon     = (WpfImage)info.Icon;
     Shortcut = (WpfShortcut)info.Shortcut;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates a new <see cref="IRelayUICommand"/> with the specified info and functions.
 /// </summary>
 ///
 /// <typeparam name="T">The parameter type of the command.</typeparam>
 /// <param name="info">The abstract information about the command.</param>
 /// <param name="execute">The execution action.</param>
 /// <param name="canExecute">The optional can execute function.</param>
 /// <returns>The constructed <see cref="IRelayUICommand"/></returns>
 IRelayUICommand CreateCommand <T>(IRelayUICommandInfo info, Action <T> execute,
                                   Func <T, bool> canExecute = null, bool keepTargetAlive = false);
Ejemplo n.º 3
0
 /// <summary>
 /// Creates a new <see cref="IRelayUICommand"/> with the specified info and actions.
 /// </summary>
 ///
 /// <typeparam name="T">The parameter type of the command.</typeparam>
 /// <param name="info">The abstract information about the command.</param>
 /// <param name="execute">The execution action.</param>
 /// <param name="canExecute">The optional can execute function.</param>
 /// <returns>The constructed <see cref="IRelayUICommand"/></returns>
 public abstract IRelayUICommand Create <T>(IRelayUICommandInfo info, Action <T> execute,
                                            Func <T, bool> canExecute = null);
Ejemplo n.º 4
0
 /// <summary>
 /// Creates a new <see cref="IRelayUICommand"/> with the specified info and actions.
 /// </summary>
 ///
 /// <param name="info">The abstract information about the command.</param>
 /// <param name="execute">The execution action.</param>
 /// <param name="canExecute">The optional can execute function.</param>
 /// <returns>The constructed <see cref="IRelayUICommand"/></returns>
 public abstract IRelayUICommand Create(IRelayUICommandInfo info, Action execute,
                                        Func <bool> canExecute = null);
Ejemplo n.º 5
0
 public WpfRelayUICommand(IRelayUICommandInfo info, Action execute, bool keepTargetAlive = false)
     : this(info, execute, null, keepTargetAlive)
 {
 }