Example #1
0
        private async void ShowAllArticles()
        {
            TheOldReader.FeedArticleList fal = App.Current.TheOldReaderManager.FeedArticleElementList;

            for (int i = 0; i < fal.items.Count(); i++)
            {
                DateTime dt = new DateTime(fal.items[i].timestampUsec);
                string smalltext = dt.ToString("M") + " @ " + fal.items[i].origin.title;

                IEnumerable<TheOldReader.SubscriptionList.SubscriptionItem> feedItem = from TheOldReader.SubscriptionList.SubscriptionItem item in App.Current.TheOldReaderManager.Subscriptions.subscriptions
                                                                                       where item.title == fal.items[i].origin.title
                                                                                       select item;

                string sFaviconPath = "", sLocalFaviconPath = "" ;
                if(feedItem.Count() > 0)
                {
                    sFaviconPath = feedItem.First().iconUrl;
                    sLocalFaviconPath = feedItem.First().localIconUrl;
                }
                FeedItemLargeControl flc = new FeedItemLargeControl(sFaviconPath, sLocalFaviconPath, HttpUtility.HtmlDecode(fal.items[i].title), smalltext, fal.items[i].id, NavigateToArticle);
                ContentPanel.Children.Add(flc);
            }
            StopBar();
        }
Example #2
0
        private async void LoadBySource()
        {
            TheOldReader.FeedArticleList fal = App.Current.TheOldReaderManager.FeedArticleElementList;

            IEnumerable<TheOldReader.FeedArticleList.FeedArticleItem> feedItem =
                from TheOldReader.FeedArticleList.FeedArticleItem item in fal.items
                where item.origin.streamid == m_itemId
                select item;

            foreach (TheOldReader.FeedArticleList.FeedArticleItem item in feedItem)
            {
                DateTime dt = new DateTime(item.timestampUsec);
                string smalltext = dt.ToString("M") + " @ " + item.origin.title;

                string sFaviconPath = "", sLocalFaviconPath = "";
                IEnumerable<TheOldReader.SubscriptionList.SubscriptionItem> feedSubItem = from TheOldReader.SubscriptionList.SubscriptionItem subitem in App.Current.TheOldReaderManager.Subscriptions.subscriptions
                                                                                          where subitem.title == item.origin.title
                                                                                          select subitem;
                if (feedItem.Count() > 0)
                {
                    sFaviconPath = feedSubItem.First().iconUrl;
                    sLocalFaviconPath = feedSubItem.First().localIconUrl;
                }
                FeedItemLargeControl flc = new FeedItemLargeControl(sFaviconPath, sLocalFaviconPath, HttpUtility.HtmlDecode(item.title), smalltext, item.id, NavigateToArticle);
                ContentPanel.Children.Add(flc);
            }
            StopBar();
        }