Beispiel #1
0
        //
        // Download Category files
        //
        public static void DownloadCategoryIndexFiles()
        {
            string url = "https://raw.githubusercontent.com/dipu-bd/uva-problem-category/master/data/";

            var index = Functions.GetCategoryIndex();

            foreach (string key in index.Keys)
            {
                long version = RegistryAccess.GetCategoryVersion(key);
                if (version < index[key])
                {
                    //problem category file
                    string file = LocalDirectory.GetCategoryDataFile(key);
                    DownloadFileAsync(url + key, file, key, Priority.Low,
                                      __DownloadCategoryFileProgress, __DownloadCategoryFileCompleted, 1);
                }
            }
        }