Ejemplo n.º 1
0
        private void RedirectToAddReply()
        {
            PostDetailsController postDetailsController = (PostDetailsController)this.CurrentController;
            AddReplyController    addReplyController    = (AddReplyController)this.controllers[(int)MenuState.AddReply];

            addReplyController.SetPostId(postDetailsController.PostId);
            this.RedirectToMenu(MenuState.AddReply);
        }
Ejemplo n.º 2
0
        private void RedirectToAddReply()
        {
            PostDetailsController postDetailsController = (PostDetailsController)CurrentController;
            AddReplyController    addReplyController    = (AddReplyController)_controllers[(int)MenuState.AddReply];

            addReplyController.GetPostViewModel(postDetailsController.PostId);
            RedirectToMenu(MenuState.AddReply);
        }
        private void RedirectToAddReply()
        {
            PostDetailsController viewPostController = (PostDetailsController)CurrentController;
            int postId = viewPostController.PostId;
            AddReplyController addReplyController = (AddReplyController)controllers[(int)MenuState.AddReply];

            addReplyController.SetReplyToPost(postId, Username);

            RedirectToMenu(MenuState.AddReply);
        }
        private void AddReply()
        {
            AddReplyController addReplyController = (AddReplyController)CurrentController;
            int postId = addReplyController.PostId;
            PostDetailsController viewPostController = (PostDetailsController)controllers[(int)MenuState.ViewPost];

            viewPostController.SetPostId(postId);

            Back();
        }
        private void ViewPost()
        {
            var categoryController = (CategoryController)this.CurrentController;
            int categoryId         = categoryController.CategoryId;

            Post[] posts     = PostService.GetPostsByCategory(categoryId).ToArray();
            int    postIndex = categoryController.CurrentPage * CategoryController.PAGE_OFFSET + this.currentOptionIndex;
            int    postId    = posts[postIndex - 1].Id;
            PostDetailsController postController = (PostDetailsController)this.controllers[(int)MenuState.ViewPost];

            postController.SetPostId(postId);
        }
Ejemplo n.º 6
0
        private void AddPost()
        {
            AddPostController addPostController = (AddPostController)this.CurrentController;

            int postId = addPostController.Post.PostId;
            PostDetailsController postViewer = (PostDetailsController)this.controllers[(int)MenuState.ViewPost];

            postViewer.SetPostId(postId);

            addPostController.ResetPost();
            this.controllerHistory.Pop();
            this.RedirectToMenu(MenuState.ViewPost);
        }
Ejemplo n.º 7
0
        private void ViewPost()
        {
            CategoryController categoryController = (CategoryController)CurrentController;

            int categoryId = categoryController.CategoryId;

            var posts = PostService.GetPostsByCategory(categoryId).ToArray();

            int postIndex = categoryController.CurrentPage * CategoryController.PageOffset + _currentOptionIndex;
            int postId    = posts[postIndex - 1].Id;

            PostDetailsController postController = (PostDetailsController)_controllers[(int)MenuState.ViewPost];

            postController.SetPostId(postId);

            RedirectToMenu(MenuState.ViewPost);
        }