public void SetCommands(Action insertAction, Action updateAction, Action deleteAction, Func<bool> insertCanExecute = null, Func<bool> updateCanExecute = null, Func<bool> deleteCanExecute = null) { InsertCommand = new EsuCommand(insertAction, insertCanExecute); UpdateCommand = new EsuCommand(updateAction, updateCanExecute); DeleteCommand = new EsuCommand(deleteAction, deleteCanExecute); }
public void SetTodoCommands(IList<Action> todoActions, IList<Func<bool>> todoCanExecutes = null) { TodoCommand = new EsuCommand(todoActions[0], todoCanExecutes == null ? null : todoCanExecutes[0]); TodoCommand1 = new EsuCommand(todoActions[1], todoCanExecutes == null ? null : todoCanExecutes[1]); TodoCommand2 = new EsuCommand(todoActions[2], todoCanExecutes == null ? null : todoCanExecutes[2]); TodoCommand3 = new EsuCommand(todoActions[3], todoCanExecutes == null ? null : todoCanExecutes[3]); }
public void SetTodoCommand(Action todoAction, Func<bool> todoCanExecute = null) { TodoCommand = new EsuCommand(todoAction, todoCanExecute); }