public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            View view            = inflater.Inflate(Resource.Layout.EditContactFragment, null, false);
            var  editContactView = view.FindViewById <EditContactView>(Resource.Id.editContact_view_EditContactView);

            Holder holder = new Holder(view);

            var interactor = new InteractorEditContact(
                new EditContactController(Connection.ConnectionController.GetInstance(),
                                          DataService.RepositoryController.RepositoryUserSettings, WebMsgParser.ParseResponsePersonalInfo),
                new EditContactModelCreator(DataService.RepositoryController.RepositoryUserSettings), new ValidationEditContact());

            _presenter = new PresenterEditContact(editContactView, interactor, new RouterEditContact(this));
            _presenter.SetConfig();
            _presenter.SetLocale(Locale.Localization.Lang);
            _presenter.SetTheme(new EditContactStyleHolderDroid <GlobalControlsTheme>(DroidDAL.ThemeParser));

            var routerToolBarBack       = new RouterToolBarBack(Activity);
            var stylesHolderToolBarBack = new ToolBarBackStylesHolderDroid <GlobalControlsTheme>(DroidDAL.ThemeParser);

            var presenterToolBarBack = new PresenterToolBarBack(holder.ToolBarBackView, routerToolBarBack,
                                                                stylesHolderToolBarBack, Locale.Localization.Lang.EditContactToolbarTitle);

            presenterToolBarBack.SetConfig();

            return(view);
        }
Exemple #2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            _editContactView.GetViewController = iOS_DAL.GetViewControllerForView;

            var interactor = new InteractorEditContact(
                new EditContactController(Connection.ConnectionController.GetInstance(),
                                          DataService.RepositoryController.RepositoryUserSettings, WebMsgParser.ParseResponsePersonalInfo),
                new EditContactModelCreator(DataService.RepositoryController.RepositoryUserSettings), new ValidationEditContact());

            _presenter = new PresenterEditContact(_editContactView, interactor, new RouterEditContact(NavigationController));
            _presenter.SetConfig();
            _presenter.SetLocale(Locale.Localization.Lang);
            _presenter.SetTheme(new EditContactStyleHolderIOS <GlobalControlsTheme>(iOS_DAL.ThemeParser));

            NavigationController.NavigationBar.Hidden = false;

            var toolbarBackView         = new ToolBarBackView(NavigationItem, NavigationController.NavigationBar);
            var routerToolBarBack       = new RouterToolBarBack(NavigationController);
            var stylesHolderToolBarBack = new ToolBarBackStylesHolderIOS <GlobalControlsTheme>(iOS_DAL.ThemeParser);
            var title = Locale.Localization.Lang.EditContactToolbarTitle;
            var presenterToolBarBack = new PresenterToolBarBack(toolbarBackView, routerToolBarBack, stylesHolderToolBarBack, title);

            presenterToolBarBack.SetConfig();
        }
        public void SetConfigTest()
        {
            _interactorMock.Setup(f => f.SetConfig());

            _interactorMock.SetupSet(f => f.Presenter = It.IsAny <IPresenterForInteractorEditContact>());
            _viewMock.SetupSet(f => f.Presenter       = It.IsAny <IPresenterForViewEditContact>());

            _presenter = new PresenterEditContact(_viewMock.Object, _interactorMock.Object, _routerMock.Object);
            _presenter.SetConfig();

            _interactorMock.Verify(f => f.SetConfig(), Times.Once());
        }