Exemple #1
0
        private void SaveToDB(object sender, AllDownloadsFinishedEventArgs e)
        {
            // For every collection in the dictionary returned.
            foreach (Feed feed in e.Downloads.Keys)
            {
                // Make sure its not null!!
                if (null != feed)
                {
                    ICollection<Article> articles = e.Downloads[feed];
                    if (null != articles && articles.Count > 0)
                    {
                        // Add it to the database.
                        App.DataBaseUtility.AddArticles(articles, feed);
                    }
                }
            }

            App.DataBaseUtility.clearOldArticles();

            if (null != LoadingFinished)
            {
                System.Diagnostics.Debug.WriteLine("old time " + Settings.LastUpdatedTime);
                Settings.LastUpdatedTime = DateTime.Now.ToString();
                System.Diagnostics.Debug.WriteLine("newtimenospaceslol" + Settings.LastUpdatedTime);
                LoadingFinished(this, new LoadingFinishedEventArgs());
            }
        }
Exemple #2
0
        private void SaveToDB(object sender, AllDownloadsFinishedEventArgs e)
        {
            // For every collection in the dictionary returned.
            foreach (Feed feed in e.Downloads.Keys)
            {
                // Make sure its not null!!
                if (null != feed)
                {
                    ICollection<Article> articles = e.Downloads[feed];
                    if (null != articles && articles.Count > 0)
                    {
                        // Add it to the database.
                        App.DataBaseUtility.AddArticles(articles, feed);
                    }
                }
            }

            App.DataBaseUtility.clearOldArticles();

            if (null != LoadingFinished)
            {
                Settings.LastUpdatedTime = DateTime.Now.ToString();
                LoadingFinished(this, new LoadingFinishedEventArgs());
            }
        }