示例#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();
        }
        public RegistrationPresenter(RegistrationView register, RegistrationService registration, UserListPresenter userListPresenter, AuthenticationView authenticationView, AuthenticationService authenticationService)
        {
            this.register              = register;
            this.registration          = registration;
            this.userListPresenter     = userListPresenter;
            this.AuthenticationView    = authenticationView;
            this.AuthenticationService = authenticationService;

            SubscribeToViewEvents();
        }
示例#3
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();
        }