public bool RunAuthentication(string Imei) { using (var view = new VwAuthentication()) { IAuthenticationPresenter presenter = new AuthenticationPresenter(view, this, _loggedInId, _username, Imei); presenter.Run(); if (presenter.isCancelled()) { return(true); } else { return(false); } } }
internal static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var applicationContext = new ApplicationContext(); var source = new XMLService(); var loginService = new LoginService(source); var registrationService = new RegistrationService(loginService, source); var mainService = new UserListService(source); var authenticationView = new AuthenticationView(applicationContext); var registrationView = new RegistrationView(applicationContext); var mainView = new MainView(applicationContext); var mainPresenter = new MainPresenter(mainView, mainService); var registrationPresenter = new RegistrationPresenter(registrationView, registrationService); var authenticationPresenter = new AuthenticationPresenter(loginService, authenticationView, mainPresenter, registrationPresenter); authenticationPresenter.Run(); }
internal static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Database.Initialisation(); ApplicationContext applicationContext = new ApplicationContext(); Authentication authentication = new Authentication(applicationContext); AuthenticationService authenticationService = new AuthenticationService(); Registration registration = new Registration(); RegisterService registerService = new RegisterService(); UserList userList = new UserList(applicationContext, registration, authentication); UserPresenter userPresenter = new UserPresenter(userList); FactoryThePresenters factoryThePresenters = new FactoryThePresenters(registration, userList, registerService); AuthenticationPresenter authenticationPresenter = new AuthenticationPresenter(authentication, factoryThePresenters, authenticationService); authentication.PasswordPicture = Resources.Incorrect; authentication.UsernamePicture = Resources.Incorrect; registration.PasswordSetPicture = Resources.Incorrect; registration.UsernameSetPicture = Resources.Incorrect; registration.ConfirmedPasswordSetPicture = Resources.Incorrect; authenticationPresenter.Run(); }
public void Run() { AuthenticationPresenter presenter = container.Value.Get <AuthenticationPresenter>(); presenter.Run(); }