Exemple #1
0
        public AuthenticationPresenter(AuthenticationView login, UserListPresenter users, AuthenticationService service, RegistrationPresenter register)
        {
            this.login    = login;
            this.users    = users;
            this.service  = service;
            this.register = register;

            SubscribeToViewEvents();
        }
Exemple #2
0
        private static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var applicationContext = new ApplicationContext();

            AuthenticationView login    = new AuthenticationView(applicationContext);
            UserListView       userList = new UserListView(applicationContext);
            RegistrationView   register = new RegistrationView(applicationContext);

            UserListService       userService           = new UserListService();
            UserListPresenter     userPresenter         = new UserListPresenter(userList, userService);
            AuthenticationService authenticationService = new AuthenticationService();
            RegistrationService   registration          = new RegistrationService(authenticationService, userPresenter);
            //AuthenticationPresenter presenter = new AuthenticationPresenter(login, userPresenter, authenticationService, registerPresenter);
            RegistrationPresenter   registerPresenter = new RegistrationPresenter(register, registration, userPresenter, login, authenticationService);
            AuthenticationPresenter presenter         = new AuthenticationPresenter(login, userPresenter, authenticationService, registerPresenter);

            presenter.Run();
        }