private void BindCommands(CommandExecutor commandExecutor) { this.View.CreateDatabase += (s, e) => commandExecutor.ExecuteCommand(new CreateDatabaseCommand()); this.View.DeleteDatabase += (s, e) => commandExecutor.ExecuteCommand(new DeleteDatabaseCommand()); this.View.EnableAllJobs += (s, e) => commandExecutor.ExecuteCommand(new EnableAllJobsCommand()); this.View.DisableAllJobs += (s, e) => commandExecutor.ExecuteCommand(new DisableAllJobsCommand()); }
public ManagerPresenter(IManagerView view, CommandExecutor commandExecutor) { if (view==null) { throw new ArgumentNullException("view"); } if (commandExecutor == null) { throw new ArgumentNullException("commandExecutor"); } this.View = view; BindCommands(commandExecutor); }