Exemplo n.º 1
0
 public UploadAvatarPresenter()
 {
     _userSession       = new UserSession();
     _profileRepository = new ProfileRepository();
     _redirector        = new Redirector();
     _alertService      = new AlertService();
 }
Exemplo n.º 2
0
 public NotifycationControlPresenter()
 {
     _webContext = new WebContext();
     _userSession = new UserSession();
     _redirector = new Redirector();
     _notifycationService = new NotificationService();
 }
Exemplo n.º 3
0
 public OrganizationService()
 {
     //  _webContext = ServiceFactory.WebContext();
     _userSession   = ServiceFactory.UserSession();
     _redirector    = ServiceFactory.Redirector();
     _orgrepository = RepositoryFactory.OrganizationRepository();
 }
Exemplo n.º 4
0
 public UploadAvatarPresenter()
 {
     _userSession =new UserSession();
     _profileRepository = new ProfileRepository();
     _redirector = new Redirector();
     _alertService = new AlertService();
 }
Exemplo n.º 5
0
        public override string ToString()
        {
            IRedirector redirector = Redirector;

            return(redirector == null?base.ToString() :
                       string.Format(ObjectUtil.SysCulture, "Redirector为{0}的RedirectPage", redirector));
        }
Exemplo n.º 6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     _redirector = ObjectFactory.GetInstance<IRedirector>();
     _webContext = ObjectFactory.GetInstance<IWebContext>();
     _presenter = new EditPhotosPresenter();
     _presenter.Init(this);
 }
Exemplo n.º 7
0
 public GroupPresenter()
 {
     _redirector = new Redirector();
     _webContext = new WebContext();
     _groupRepository = new GroupRepository();
     _fileService = new FileService();
 }
Exemplo n.º 8
0
 public ProfileDisplayPresenter()
 {
     _redirector = new SPKTCore.Core.Impl.Redirector();
     _friendRepository = new SPKTCore.Core.DataAccess.Impl.FriendRepository();
     _userSession = new SPKTCore.Core.Impl.UserSession();
     _friendservice = new SPKTCore.Core.Impl.FriendService();
 }
Exemplo n.º 9
0
 protected void Page_Load(object sender, EventArgs e)
 {
     _presenter = new ViewForumPresenter();
     _presenter.Init(this);
     _redirector = new Redirector();
     _webContext = new WebContext();
 }
Exemplo n.º 10
0
 public NotifycationControlPresenter()
 {
     _webContext          = new WebContext();
     _userSession         = new UserSession();
     _redirector          = new Redirector();
     _notifycationService = new NotificationService();
 }
 public ConfirmFriendshipRequestPresenter()
 {
     _webContext = ObjectFactory.GetInstance<IWebContext>();
     _configuration = ObjectFactory.GetInstance<IConfiguration>();
     _redirector = ObjectFactory.GetInstance<IRedirector>();
     _friendService = ObjectFactory.GetInstance<IFriendService>();
 }
Exemplo n.º 12
0
 public ConfirmFriendshipRequestPresenter()
 {
     _webContext = new SPKTCore.Core.Impl.WebContext();
     _friendInvitationRepository = new SPKTCore.Core.DataAccess.Impl.FriendInvitationRepository();
     _accountRepository = new SPKTCore.Core.DataAccess.Impl.AccountRepository();
     _redirector = new SPKTCore.Core.Impl.Redirector();
 }
Exemplo n.º 13
0
 protected void Page_Load(object sender, EventArgs e)
 {
     _usersession = new UserSession();
     _for = new FolderRepository();
     _redirect = new Redirector();
     up = new UploadAvatarPresenter();
 }
Exemplo n.º 14
0
 public void Init(ISearch view)
 {
     _view = view;
     _accountRepository = new SPKTCore.Core.DataAccess.Impl.AccountRepository();
     _profileRepository = new SPKTCore.Core.DataAccess.Impl.ProfileRepository();
     _redirector = new SPKTCore.Core.Impl.Redirector();
 }
Exemplo n.º 15
0
 public void Init(ISearch view)
 {
     _view = view;
     _accountRepository = new SPKTCore.Core.DataAccess.Impl.AccountRepository();
     _profileRepository = new SPKTCore.Core.DataAccess.Impl.ProfileRepository();
     _redirector        = new SPKTCore.Core.Impl.Redirector();
 }
Exemplo n.º 16
0
 public ProfileDisplayPresenter()
 {
     _redirector       = new SPKTCore.Core.Impl.Redirector();
     _friendRepository = new SPKTCore.Core.DataAccess.Impl.FriendRepository();
     _userSession      = new SPKTCore.Core.Impl.UserSession();
     _friendservice    = new SPKTCore.Core.Impl.FriendService();
 }
Exemplo n.º 17
0
 public ViewForumPresenter()
 {
     _postRepository = new BoardPostRepository();
     _webContext = new WebContext();
     _forumRepository = new BoardForumRepository();
     _redirector = new Redirector();
 }
Exemplo n.º 18
0
 public HomePresenter()
 {
     _userSession = new UserSession();
     _accountService=new AccountService();
     _redirector = new Redirector();
     _profileService = new ProfileService();
 }
Exemplo n.º 19
0
        public ProfilePresenter()
        {
            _redirector = ObjectFactory.GetInstance<IRedirector>();
            _userSession = ObjectFactory.GetInstance<IUserSession>();
            if (!_userSession.LoggedIn || _userSession.CurrentUser == null)
                _redirector.GoToAccountLoginPage();

            _alertService = ObjectFactory.GetInstance<IAlertService>();
            _webContext = ObjectFactory.GetInstance<IWebContext>();
            _accountService = ObjectFactory.GetInstance<IAccountService>();
            _privacyService = ObjectFactory.GetInstance<IPrivacyService>();
            _account = _userSession.CurrentUser;

            if (_webContext.AccountID > 0 && _webContext.AccountID != _userSession.CurrentUser.AccountID)
            {
                _accountBeingViewed = _accountService.GetAccountByID(_webContext.AccountID);
                _accountBeingViewed.Profile = Profile.GetProfileByAccountID(_webContext.AccountID);
            }
            else
            {
                _accountBeingViewed = _userSession.CurrentUser;
                _accountBeingViewed.Profile = Profile.GetProfileByAccountID(_userSession.CurrentUser.AccountID);
            }
            if (_accountBeingViewed == null)
                _redirector.GoToAccountLoginPage();
            if (_accountBeingViewed.Profile != null && _accountBeingViewed.Profile.ProfileID > 0)
                _privacyFlags = PrivacyFlag.GetPrivacyFlagsByProfileID(_accountBeingViewed.Profile.ProfileID);
            else
                _redirector.GoToHomePage();

        }
Exemplo n.º 20
0
 public GroupPresenter()
 {
     _redirector      = new Redirector();
     _webContext      = new WebContext();
     _groupRepository = new GroupRepository();
     _fileService     = new FileService();
 }
Exemplo n.º 21
0
 public ReadMessagePresenter()
 {
     _webContext = new WebContext();
     _userSession = new UserSession();
     _redirector = new Redirector();
     _messageRepository = new SPKTCore.Core.DataAccess.Impl.MessageRepository();
 }
 public ConfirmFriendshipRequestPresenter()
 {
     _webContext = new SPKTCore.Core.Impl.WebContext();
     _friendInvitationRepository = new SPKTCore.Core.DataAccess.Impl.FriendInvitationRepository();
     _accountRepository          = new SPKTCore.Core.DataAccess.Impl.AccountRepository();
     _redirector = new SPKTCore.Core.Impl.Redirector();
 }
Exemplo n.º 23
0
 public MyBlogsPresenter()
 {
     _webContext = ObjectFactory.GetInstance<IWebContext>();
     _blogRepository = ObjectFactory.GetInstance<IBlogRepository>();
     _redirector = ObjectFactory.GetInstance<IRedirector>();
     _userSession = ObjectFactory.GetInstance<IUserSession>();
 }
Exemplo n.º 24
0
 public ReadMessagePresenter()
 {
     _webContext        = new WebContext();
     _userSession       = new UserSession();
     _redirector        = new Redirector();
     _messageRepository = new SPKTCore.Core.DataAccess.Impl.MessageRepository();
 }
Exemplo n.º 25
0
        public override IRedirector CreateRedirector(IPageData pageData)
        {
            IRedirector redirector = ObjectUtil.CreateObject(ObjectType).Convert <IRedirector>();

            TkDebug.AssertNotNull(redirector, string.Format(
                                      ObjectUtil.SysCulture, "无法根据类型{0}创建实例", ObjectType), this);
            return(redirector);
        }
      public AppDropDownsService()
      {
        //  _webContext = ServiceFactory.WebContext();
          _userSession = ServiceFactory.UserSession();
          _redirector = ServiceFactory.Redirector();
          _repdropdown = new AppDropDownsRepository();

      }
Exemplo n.º 27
0
 public ForumPresenter()
 {
     _boardService       = new BoardService();
     _forumRepository    = new BoardForumRepository();
     _categoryRepository = new BoardCategoryRepository();
     _redirector         = new Redirector();
     _webContext         = new WebContext();
 }
Exemplo n.º 28
0
        public void Init(ILoginLinks view)
        {
            _userSession = ObjectFactory.GetInstance<IUserSession>();
            _redirector = ObjectFactory.GetInstance<IRedirector>();
            _accountService = ObjectFactory.GetInstance<IAccountService>();

            view.ShowAppropriateLoginStatePanel(_userSession.LoggedIn, _userSession.Username);
        }
Exemplo n.º 29
0
 public AccountService()
 {
     _accountRepository = ObjectFactory.GetInstance<IAccountRepository>();
     _permissionRepository = ObjectFactory.GetInstance<IPermissionRepository>();
     _userSession = ObjectFactory.GetInstance<IUserSession>();
     _redirector = ObjectFactory.GetInstance<IRedirector>();
     _email = ObjectFactory.GetInstance<IEmail>();
 }
Exemplo n.º 30
0
 public MembersPresenter()
 {
     _accountRepository = new AccountRepository();
     _groupMemberRepository = new GroupMemberRepository();
     _webContext = new WebContext();
     _redirector = new Redirector();
     _groupService = new GroupService();
 }
Exemplo n.º 31
0
 public EditAccountPresenter()
 {
     _userSession = ObjectFactory.GetInstance<IUserSession>();
     _accountRepository = ObjectFactory.GetInstance<IAccountRepository>();
     _redirector = ObjectFactory.GetInstance<IRedirector>();
     _accountService = ObjectFactory.GetInstance<IAccountService>();
     _email = ObjectFactory.GetInstance<IEmail>();
 }
Exemplo n.º 32
0
 public ForumPresenter()
 {
     _boardService = ObjectFactory.GetInstance<IBoardService>();
     _forumRepository =new BoardForumRepository();
     _categoryRepository = new BoardCategoryRepository();
     _redirector = new Redirector();
     _webContext = new WebContext();
 }
Exemplo n.º 33
0
 public RegisterPresenter()
 {
     _accountService = new AccountService();
     _webContext = new WebContext();
     _email = new Email();
     _redirector = new Redirector();
     _parameterIntService = new ParameterIntService();
 }
Exemplo n.º 34
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _redirector = new Redirector();
            _presenter = new MXH1MasterPresenter();

            _usersession = new UserSession();
            _webContext = new WebContext();
        }
Exemplo n.º 35
0
 protected void Page_Load(object sender, EventArgs e)
 {
     _fileService = new FileService();
     LoadData(group, accounts);
     _webContext            = new WebContext();
     _groupMemberRepository = new GroupMemberRepository();
     _redirector            = new Redirector();
 }
Exemplo n.º 36
0
 public MembersPresenter()
 {
     _accountRepository     = new AccountRepository();
     _groupMemberRepository = new GroupMemberRepository();
     _webContext            = new WebContext();
     _redirector            = new Redirector();
     _groupService          = new GroupService();
 }
Exemplo n.º 37
0
 public ManageGroupPresenter()
 {
     _redirector = ObjectFactory.GetInstance<IRedirector>();
     _webContext = ObjectFactory.GetInstance<IWebContext>();
     File._webContext = _webContext;
     _groupService = ObjectFactory.GetInstance<IGroupService>();
     _fileService = ObjectFactory.GetInstance<IFileService>();
 }
Exemplo n.º 38
0
 public PostPresenter()
 {
     _blogRepository = ObjectFactory.GetInstance<IBlogRepository>();
     _webContext = ObjectFactory.GetInstance<IWebContext>();
     _userSession = ObjectFactory.GetInstance<IUserSession>();
     _redirector = ObjectFactory.GetInstance<IRedirector>();
     _alertService = ObjectFactory.GetInstance<IAlertService>();
 }
Exemplo n.º 39
0
 protected override void OnInit(EventArgs e)
 {
     _webContext = ObjectFactory.GetInstance<IWebContext>();
     _redirector = ObjectFactory.GetInstance<IRedirector>();
     _userSession = ObjectFactory.GetInstance<IUserSession>();
     _presenter = new ViewAlbumPresenter();
     _presenter.Init(this);
 }
Exemplo n.º 40
0
 protected void Page_Load(object sender, EventArgs e)
 {
     _webcontext   = new WebContext();
     _ussersession = new UserSession();
     _ac           = new AccountRepository();
     _redirect     = new Redirector();
     MessageNew1.settbTO(idac);
 }
Exemplo n.º 41
0
 public EditAccountPresenter()
 {
     _userSession = new UserSession();
     _accountRepository = new SPKTCore.Core.DataAccess.Impl.AccountRepository();
     _redirector = new Redirector();
     _accountService = new AccountService();
     _email = new Email();
 }
Exemplo n.º 42
0
 public ForumPresenter()
 {
     _boardService = new BoardService();
     _forumRepository =new BoardForumRepository();
     _categoryRepository = new BoardCategoryRepository();
     _redirector = new Redirector();
     _webContext = new WebContext();
 }
Exemplo n.º 43
0
 protected void Page_Load(object sender, EventArgs e)
 {
     _email         = new SPKTCore.Core.Impl.Email();
     _usersession   = new SPKTCore.Core.Impl.UserSession();
     _webcontext    = new WebContext();
     _ac            = new AccountRepository();
     _redirect      = new Redirector();
     bt_invite.Text = "Mời bạn";
 }
Exemplo n.º 44
0
 public EditAccountPresenter()
 {
     _userSession          = new UserSession();
     _accountRepository    = new SPKTCore.Core.DataAccess.Impl.AccountRepository();
     _redirector           = new Redirector();
     _accountService       = new AccountService();
     _permissionRepository = new PermissionRepository();
     _email = new Email();
 }
Exemplo n.º 45
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _webContext = ObjectFactory.GetInstance<IWebContext>();
            _userSession = ObjectFactory.GetInstance<IUserSession>();
            _redirector = ObjectFactory.GetInstance<IRedirector>();

            if(!(_webContext.AlbumID > 0))
                _redirector.GoToPhotos();
        }
Exemplo n.º 46
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _redirector = new Redirector();
<<<<<<< HEAD
=======
            _presenter = new MXH1MasterPresenter();
            _presenter.Init(this);
>>>>>>> 74349b0b329f92be16c92eafca08b233a2499789
        }
Exemplo n.º 47
0
 protected void Page_Load(object sender, EventArgs e)
 {
     _redirector = new Redirector();
     _presenter = new MXH1MasterPresenter();
     _presenter.Init(this);
     _usersession = new UserSession();
     _webContext = new WebContext();
     img_av.ImageUrl = "~/Image/ProfileAvatar.aspx";
 }
Exemplo n.º 48
0
 protected void Page_Load(object sender, EventArgs e)
 {
     _email = new SPKTCore.Core.Impl.Email();
     _usersession = new SPKTCore.Core.Impl.UserSession();
     _webcontext = new WebContext();
     _ac = new AccountRepository();
     _redirect = new Redirector();
     bt_invite.Text = "Mời bạn";
 }
Exemplo n.º 49
0
 protected void Page_Load(object sender, EventArgs e)
 {
     _redirector = new Redirector();
     _presenter  = new MXH1MasterPresenter();
     _presenter.Init(this);
     _usersession    = new UserSession();
     _webContext     = new WebContext();
     img_av.ImageUrl = "~/Image/ProfileAvatar.aspx";
 }
Exemplo n.º 50
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _redirector = new Redirector();
            _presenter  = new MXH1MasterPresenter();

            _usersession        = new UserSession();
            _webContext         = new WebContext();
            lb_dangky.Visible   = false;
            lb_dangnhap.Visible = false;
        }
Exemplo n.º 51
0
 public PostForumPostPresenter()
 {
     _postRepository     = new BoardPostRepository();
     _forumRepository    = new BoardForumRepository();
     _categoryRepository = new BoardCategoryRepository();
     _redirector         = new Redirector();
     _webContext         = new WebContext();
     _alertService       = new AlertService();
     _groupRepository    = new GroupRepository();
 }
Exemplo n.º 52
0
 public ViewGroupPresenter()
 {
     _groupRepository         = new GroupRepository();
     _webContext              = new WebContext();
     _redirector              = new Redirector();
     _boardForumRepository    = new BoardForumRepository();
     _boardCategoryRepository = new BoardCategoryRepository();
     _groupMemberRepository   = new GroupMemberRepository();
     _groupService            = new GroupService();
     _boardPostRepository     = new BoardPostRepository();
 }
Exemplo n.º 53
0
 public HomePresenter()
 {
     _userSession         = new UserSession();
     _accountService      = new AccountService();
     _redirector          = new Redirector();
     _profileService      = new ProfileService();
     _privacyService      = new PrivacyService();
     _friendService       = new FriendService();
     _StatusUpdateService = new StatusUpdateService();
     _webContext          = new WebContext();
 }
Exemplo n.º 54
0
 public void Init(ILogin view)
 {
     _view           = view;
     _accountService = new SPKTCore.Core.Impl.AccountService();
     _redirector     = new SPKTCore.Core.Impl.Redirector();
     _webContext     = new SPKTCore.Core.Impl.WebContext();
     if (!string.IsNullOrEmpty(_webContext.FriendshipRequest))
     {
         _view.DisplayMessage("Đăng nhập để xác nhận");
     }
 }
        public AccountService()
        {
            //This way AccountService can use any accountRepository(does not depend on one Repository)!
            //It gets Repository from RepositoryFactory! So he has someone(factory) to ask for any Repository.
            //Currently our RepositoryFactory is static and directly depends on StructureMap IOC.

            _accountRepository = RepositoryFactory.AccountRepository();
            _webContext        = ServiceFactory.WebContext();
            _userSession       = ServiceFactory.UserSession();
            _redirector        = ServiceFactory.Redirector();
        }
Exemplo n.º 56
0
 public MyGroupsPresenter()
 {
     _redirector            = new Redirector();
     _webContext            = new WebContext();
     _groupRepository       = new GroupRepository();
     _fileService           = new FileService();
     _boardPostRepository   = new BoardPostRepository();
     _boardForumRepository  = new BoardForumRepository();
     _groupForumRepository  = new GroupForumRepository();
     _groupMemberRepository = new GroupMemberRepository();
     _usersession           = new UserSession();
 }
Exemplo n.º 57
0
 public AccountService()
 {
     _accountRepository    = new SPKTCore.Core.DataAccess.Impl.AccountRepository();
     _permissionRepository = new SPKTCore.Core.DataAccess.Impl.PermissionRepository();
     _userSession          = new UserSession();
     _redirector           = new Redirector();
     _email          = new Email();
     _profileService = new ProfileService();
     _webContext     = new SPKTCore.Core.Impl.WebContext();
     _friendService  = new SPKTCore.Core.Impl.FriendService();
     //friendInvitation = new FriendInvitation();
 }
Exemplo n.º 58
0
        public static void RedirectPage(IMetaData metaData, ISource source, IWebHandler handler,
                                        OutputData outputData, IRedirector redirector)
        {
            MetaDataUtil.SetMetaData(redirector, handler.Style, metaData);
            string url = redirector.Redirect(source, handler, outputData);

            TkDebug.AssertNotNullOrEmpty(url,
                                         "Redirector.Redirect函数返回的Url为空,不能重定向该地址", redirector);
            url = AppUtil.ResolveUrl(url);

            handler.Response.Redirect(url, false);
        }
Exemplo n.º 59
0
        /// <summary>
        /// Removes <paramref name="redirector"/> from the list of redirectors.
        /// </summary>
        /// <param name="redirector">The redirector to remove.</param>
        /// <returns><c>true</c> if <paramref name="redirector"/> was found</returns>
        /// <exception cref="ArgumentNullException"><paramref name="redirector"/> is <c>null</c>.</exception>
        public bool RemoveRedirector(IRedirector redirector)
        {
            if (redirector == null)
            {
                throw new ArgumentNullException("redirector");
            }

            lock (redirectors)
            {
                return(redirectors.Remove(redirector));
            }
        }
Exemplo n.º 60
0
        /// <summary>
        /// Adds <paramref name="redirector"/> to the list of redirectors.
        /// </summary>
        /// <param name="redirector">The redirector to add.</param>
        /// <exception cref="ArgumentNullException"><paramref name="redirector"/> is <c>null</c>.</exception>
        public void AddRedirector(IRedirector redirector)
        {
            if (redirector == null)
            {
                throw new ArgumentNullException("redirector");
            }

            lock (redirectors)
            {
                redirectors.Add(redirector);
            }
        }