示例#1
0
 public ProfileController(
     IProfileManager profileManager,
     IProfilePresenter profilePresenter,
     IServiceProvider serviceProvider) : base(serviceProvider)
 {
     this.profileManager   = profileManager;
     this.profilePresenter = profilePresenter;
 }
示例#2
0
 public ProfileController(
     IProfileManager profileManager,
     IProfilePresenter profilePresenter,
     IProfilesVisitsCounterService profilesVisitsCounterService,
     IServiceProvider serviceProvider) : base(serviceProvider)
 {
     this.profileManager               = profileManager;
     this.profilePresenter             = profilePresenter;
     this.profilesVisitsCounterService = profilesVisitsCounterService;
 }
示例#3
0
        /// <summary>
        /// Привязать презентер
        /// </summary>
        /// <param name="presenter"></param>
        /// <param name="requiresInitialState"></param>
        public void AttachToPresenter(IProfilePresenter presenter, bool requiresInitialState)
        {
            if (presenter == null)
            {
                throw new ArgumentNullException(nameof(presenter));
            }

            DetatchFromPresenter();

            Presenter = presenter;
            Presenter.ConnectView(this, requiresInitialState);
        }
        public ProfileRouter(IStartupRouter presentingRouter)
        {
            this.presentingRouter = presentingRouter;
            profileStoryboard     = UIStoryboard.FromName("Profile", null);
            presenter             = new ProfilePresenter(this);
            var myProfileView = profileStoryboard.InstantiateViewController(MyProfileView.Identifier) as MyProfileView;

            myProfileView.Presenter = presenter;

            myProfileView.TabBarItem = new UITabBarItem("Home.TabBar.Profile.Title".Translate(), UIImage.FromBundle("Profil"), UIImage.FromBundle("Profil-active"));

            this.ViewControllers = new UIViewController[] { myProfileView };

            NavigationBar.Hidden = true;
        }