Пример #1
0
        public void Crawl(string categoriesFilename, string toolsFilename, string publicationsFilename)
        {
            do
            {
                SessionTempPath =
                    Path.GetFullPath(Path.GetTempPath()) +
                    Utilities.GetRandomString(10) +
                    Path.DirectorySeparatorChar;
            }while (Directory.Exists(SessionTempPath));
            Directory.CreateDirectory(SessionTempPath);

            _catogiresFilename    = categoriesFilename;
            _toolsFilename        = toolsFilename;
            _publicationsFilename = publicationsFilename;

            Publications.Clear();

            UpdateCategories();
            var tools = GetTools().Result;

            if (tools != null)
            {
                GetPublications(tools);
            }
        }
Пример #2
0
 private void UpdateFeed()
 {
     View.Dispatcher.Invoke(() => {
         Publications.Clear();
         var temp = FeedService.GetPublications();
         foreach (var item in temp)
         {
             Publications.Add(item);
         }
     });
 }
Пример #3
0
        async Task ExecuteLoadGivesCommand()
        {
            IsBusy = true;

            try
            {
                Publications.Clear();
                var publications = await DataStoreGive.GetItemsAsync(true);

                foreach (var publication in publications)
                {
                    Publications.Add(publication);
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
            }
            finally
            {
                IsBusy = false;
            }
        }