Beispiel #1
0
        private void InitializeContext()
        {
            WebRequestService.CoroutineTarget = this;

            _homePresenter    = new HomePresenter(_homeView);
            _profilePresenter = new ProfilePresenter(_profileView);
            _cardsPresenter   = new CardsPresenter(_cardsView);
            _clubsPresenter   = new ClubsPresenter(_clubsView);

            _uiNavigationController = new UINavigationController();

            _uiNavigationController.AddPresenter(_homePresenter);
            _uiNavigationController.AddPresenter(_profilePresenter);
            _uiNavigationController.AddPresenter(_cardsPresenter);
            _uiNavigationController.AddPresenter(_clubsPresenter);

            _homePresenter.OnAttemptViewChange    += _uiNavigationController.ActivateView;
            _profilePresenter.OnAttemptViewChange += _uiNavigationController.ActivateView;
            _clubsPresenter.OnAttemptViewChange   += _uiNavigationController.ActivateView;
            _cardsPresenter.OnAttemptViewChange   += _uiNavigationController.ActivateView;

            _toolBar.OnBack += _uiNavigationController.ActivatePreviousView;
            _uiNavigationController.HistoryAvailable += _toolBar.EnableBackButton;
            _uiNavigationController.OnViewTransition += _viewTransitionController.MakeViewTransition;
        }