示例#1
0
 public LoginForm(MainForm mainForm)
 {
     InitializeComponent();
     _mainForm  = mainForm;
     _router    = new Router(this, _mainForm);
     _request   = new Request();
     _presenter = new AuthPresenter(new AuthInteractor(_request), this, _router);
 }
示例#2
0
        public AuthPresenter(IAuthView view, IAuthRouter router)
        {
            _view = view ?? throw new ArgumentNullException("Provided view is null!");
            _view.OnLocaleChanged    += LocaleChanged;
            _view.OnLoginBtnPressed  += LoginAttempt;
            _view.OnSignUpBtnPressed += SignUpAllowed;

            _router = router ?? throw new ArgumentNullException("Provided router is null!");

            LocaleChanged("EN");
        }
 public AuthPresenter(IAuthInteractor interactor, IAuthView view, IAuthRouter router)
 {
     _interactor = interactor ?? throw new ArgumentNullException(nameof(interactor));
     _view       = view ?? throw new ArgumentNullException(nameof(view));
     _router     = router ?? throw new ArgumentNullException(nameof(router));
 }