private void PreviewPhoto(UIImage image, string url)
        {
            var myViewController = new ImagePreviewViewController();

            myViewController.ImageForPreview = image;
            myViewController.ImageUrl        = url;
            _navController.PushViewController(myViewController, true);
        }
Exemplo n.º 2
0
        private void CellAction(ActionType type, Post post)
        {
            switch (type)
            {
            case ActionType.Profile:
                if (post.Author == BasePresenter.User.Login)
                {
                    return;
                }
                var myViewController = new ProfileViewController();
                myViewController.Username = post.Author;
                NavigationController.PushViewController(myViewController, true);
                break;

            case ActionType.Preview:
                var myViewController2 = new ImagePreviewViewController();
                //TODO: pass image
                myViewController2.ImageForPreview = null;
                myViewController2.ImageUrl        = post.Body;
                TabBarController.NavigationController.PushViewController(myViewController2, true);
                break;

            case ActionType.Voters:
                NavigationController.PushViewController(new VotersViewController(post, VotersType.Likes), true);
                break;

            case ActionType.Flagers:
                NavigationController.PushViewController(new VotersViewController(post, VotersType.Flags), true);
                break;

            case ActionType.Comments:
                var myViewController4 = new CommentsViewController();
                myViewController4.Post = post;
                myViewController4.HidesBottomBarWhenPushed = true;
                NavigationController.PushViewController(myViewController4, true);
                break;

            case ActionType.Like:
                Vote(post);
                break;

            case ActionType.More:
                Flag(post);
                break;

            default:
                break;
            }
        }