Beispiel #1
0
        public static void getFutureArticles()
        {
            List <Article> articles = new List <Article>();

            try
            {
                articles = (List <Article>)userSettings["Articles"];
            }
            catch
            {
            }

            int maks = 15;

            if (articles.Count < maks)
            {
                for (int i = articles.Count; i < maks; i++)
                {
                    if (NetworkInterface.GetIsNetworkAvailable())
                    {
                        WikiParser.WikiArticleParser wep = new WikiArticleParser(HelperMetjods.GetLanguage(), true);
                    }
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// Agent that runs a scheduled task
        /// </summary>
        /// <param name="task">
        /// The invoked task
        /// </param>
        /// <remarks>
        /// This method is called when a periodic or resource intensive task is invoked
        /// </remarks>
        protected override void OnInvoke(ScheduledTask task)
        {
            if (task is PeriodicTask)
            {
                if (!NetworkInterface.GetIsNetworkAvailable())
                {
                    NotifyComplete();
                    return;
                }

                wap = new WikiParser.WikiArticleParser(HelperMetjods.GetLanguage(), false);
                wap.Changedevent += new WikiParser.WikiArticleParser.ArticleDownHanlder(wap_Changedevent);
            }
        }