public void Init(IViewPost View) { _view = View; blog=_blogRepository.GetBlogByBlogID(_webContext.BlogID); if(blog!=null) { _view.LoadPost(blog); if (_userSession.LoggedIn) { if (blog.AccountID == _userSession.CurrentUser.AccountID) { _view.DisplayEdit(); } } } }
public PresenterPost(IViewPost view, IInteractorPost interactor, IRouterPost router, PostOtherThemeStrings otherThemeStrings, IPostHeaderStylesHolder headerStylesHolder, IPostSocialStylesHolder socialStylesHolder, IPostBodyStylesHolder bodyStylesHolder, IPost postLocale, bool isPostDetailed) { _view = view; _router = router; _interactor = interactor; _postLocale = postLocale; _isPostDetailed = isPostDetailed; _otherThemeStrings = otherThemeStrings; IPresenterPostHeader presenterPostHeader = new PresenterPostHeader(view.ViewPostHeader, interactor.InteractorPostHeader, router, DataService.RepositoryController.RepositoryPost.LangPost, headerStylesHolder); IPresenterPostBody presenterPostBody = new PresenterPostBody(view.ViewPostBody, interactor.InteractorPostBody, router, bodyStylesHolder, isPostDetailed); IPresenterPostSocial presenterPostSocial = new PresenterPostSocial(view.ViewPostSocial, interactor.InteractorPostSocial, router, DataService.RepositoryController.RepositoryPost.LangPost, socialStylesHolder); interactor.InteractorPostBody.Presenter = presenterPostBody; interactor.InteractorPostHeader.Presenter = presenterPostHeader; interactor.InteractorPostSocial.Presenter = presenterPostSocial; _view.SetConfig(); presenterPostHeader.SetConfig(); presenterPostSocial.SetConfig(); }
public void Init(IViewPost View) { _view = View; LoadData(); }
public void Init(IViewPost View) { _view = View; _view.LoadPost(Blog.GetBlogByBlogID(_webContext.BlogID)); }