Beispiel #1
0
        internal ObservableCollection <ListViewBlogsInfo> GenerateSource()
        {
            blogsInfo = new ObservableCollection <ListViewBlogsInfo>();

            var blogsTitleCount    = BlogsTitle.Count() - 1;
            var blogsCategoryCount = BlogsCategory.Count() - 1;
            var blogsAuthorCount   = BlogsAuthers.Count() - 1;
            var blogsReadMoreCount = BlogsReadMoreInfo.Count() - 1;

            for (int i = 0; i < 5; i++)
            {
                var blog = new ListViewBlogsInfo()
                {
                    BlogTitle          = BlogsTitle[blogsTitleCount - i],
                    BlogCategory       = BlogsCategory[blogsCategoryCount - i],
                    BlogAuthor         = BlogsAuthers[blogsAuthorCount - i],
                    BlogAuthorIcon     = ImageSource.FromResource("ListViewPullToRefresh.Images.BlogAuthor.png"),
                    BlogCategoryIcon   = ImageSource.FromResource("ListViewPullToRefresh.Images.BlogCategory.png"),
                    BlogFacebookIcon   = ImageSource.FromResource("ListViewPullToRefresh.Images.Blog_Facebook.png"),
                    BlogTwitterIcon    = ImageSource.FromResource("ListViewPullToRefresh.Images.Blog_Twitter.png"),
                    BlogGooglePlusIcon = ImageSource.FromResource("ListViewPullToRefresh.Images.Blog_Google Plus.png"),
                    BlogLinkedInIcon   = ImageSource.FromResource("ListViewPullToRefresh.Images.Blog_LinkedIn.png"),
                    ReadMoreContent    = BlogsReadMoreInfo[blogsReadMoreCount - i],
                };
                blogsInfo.Insert(0, blog);
            }
            return(blogsInfo);
        }
Beispiel #2
0
//        List<BlogInfo> items;

        public MockBlogCloudStore()
        {
            items = new ObservableCollection <BlogInfo>();
            var blogsTitleCount    = BlogsTitle.Count() - 1;
            var blogsCategoryCount = BlogsCategory.Count() - 1;
            var blogsAuthorCount   = BlogsAuthers.Count() - 1;
            var blogsReadMoreCount = BlogsReadMoreInfo.Count() - 1;

            for (int i = 0; i < 5; i++)
            {
                var blog = new BlogInfo()
                {
                    BlogTitle    = BlogsTitle[blogsTitleCount - i],
                    BlogCategory = BlogsCategory[blogsCategoryCount - i],
                    BlogAuthor   = BlogsAuthers[blogsAuthorCount - i],
//                    BlogAuthorIcon = ImageSource.FromResource("Chronique.Images.BlogAuthor.png"),
//                    BlogCategoryIcon = ImageSource.FromResource("Chronique.Images.BlogCategory.png"),
//                    BlogFacebookIcon = ImageSource.FromResource("Chronique.Images.SocialNetwork.Blog_Facebook.png"),
//                    BlogTwitterIcon = ImageSource.FromResource("Chronique.Images.SocialNetwork.Blog_Twitter.png"),
//                    BlogGooglePlusIcon =
//                        ImageSource.FromResource("Chronique.Images.SocialNetwork.Blog_Google_Plus.png"),
//                    BlogLinkedInIcon = ImageSource.FromResource("Chronique.Images.SocialNetwork.Blog_LinkedIn.png"),

                    FB_link = GenerateUriFb(BlogsTitle[blogsTitleCount - i]),
                    TW_link = GenerateUriTw(BlogsTitle[blogsTitleCount - i]),
                    LI_link = GenerateUriLi(BlogsTitle[blogsTitleCount - i]),
                    GP_link = GenerateUriGp(BlogsTitle[blogsTitleCount - i]),

                    ReadMoreContent = BlogsReadMoreInfo[blogsReadMoreCount - i],
                };
                items.Insert(0, blog);
            }
        }
Beispiel #3
0
        internal ObservableCollection <ListViewBlogsInfo> GenerateSource()
        {
            blogsInfo = new ObservableCollection <ListViewBlogsInfo>();
            var blogsTitleCount    = BlogsTitle.Count() - 1;
            var blogsCategoryCount = BlogsCategory.Count() - 1;
            var blogsAuthorCount   = BlogsAuthers.Count() - 1;
            var blogsReadMoreCount = BlogsReadMoreInfo.Count() - 1;

            for (int i = 0; i < 5; i++)
            {
                var blog = new ListViewBlogsInfo()
                {
                    BlogTitle       = BlogsTitle[blogsTitleCount - i],
                    BlogCategory    = BlogsCategory[blogsCategoryCount - i],
                    BlogAuthor      = BlogsAuthers[blogsAuthorCount - i],
                    ReadMoreContent = BlogsReadMoreInfo[blogsReadMoreCount - i],
                };
                blogsInfo.Insert(0, blog);
            }
            return(blogsInfo);
        }
Beispiel #4
0
        internal ObservableCollection <ListViewBlogsInfo> GenerateSource()
        {
            blogsInfo = new ObservableCollection <ListViewBlogsInfo>();
            Assembly assembly           = typeof(PullToRefresh).GetTypeInfo().Assembly;
            var      blogsTitleCount    = BlogsTitle.Count() - 1;
            var      blogsCategoryCount = BlogsCategory.Count() - 1;
            var      blogsAuthorCount   = BlogsAuthers.Count() - 1;
            var      blogsReadMoreCount = BlogsReadMoreInfo.Count() - 1;

            for (int i = 0; i < 5; i++)
            {
                var blog = new ListViewBlogsInfo()
                {
                    BlogTitle    = BlogsTitle[blogsTitleCount - i],
                    BlogCategory = BlogsCategory[blogsCategoryCount - i],
                    BlogAuthor   = BlogsAuthers[blogsAuthorCount - i],
#if COMMONSB
                    BlogAuthorIcon     = ImageSource.FromResource("SampleBrowser.Icons.BlogAuthor.png", assembly),
                    BlogCategoryIcon   = ImageSource.FromResource("SampleBrowser.Icons.BlogCategory.png", assembly),
                    BlogFacebookIcon   = ImageSource.FromResource("SampleBrowser.Icons.Blog_Facebook.png", assembly),
                    BlogTwitterIcon    = ImageSource.FromResource("SampleBrowser.Icons.Blog_Twitter.png", assembly),
                    BlogGooglePlusIcon = ImageSource.FromResource("SampleBrowser.Icons.Blog_Google Plus.png", assembly),
                    BlogLinkedInIcon   = ImageSource.FromResource("SampleBrowser.Icons.Blog_LinkedIn.png", assembly),
#else
                    BlogAuthorIcon     = ImageSource.FromResource("SampleBrowser.SfListView.Icons.BlogAuthor.png", assembly),
                    BlogCategoryIcon   = ImageSource.FromResource("SampleBrowser.SfListView.Icons.BlogCategory.png", assembly),
                    BlogFacebookIcon   = ImageSource.FromResource("SampleBrowser.SfListView.Icons.Blog_Facebook.png", assembly),
                    BlogTwitterIcon    = ImageSource.FromResource("SampleBrowser.SfListView.Icons.Blog_Twitter.png", assembly),
                    BlogGooglePlusIcon = ImageSource.FromResource("SampleBrowser.SfListView.Icons.Blog_Google Plus.png", assembly),
                    BlogLinkedInIcon   = ImageSource.FromResource("SampleBrowser.SfListView.Icons.Blog_LinkedIn.png", assembly),
#endif
                    ReadMoreContent = BlogsReadMoreInfo[blogsReadMoreCount - i],
                };
                blogsInfo.Insert(0, blog);
            }
            return(blogsInfo);
        }