示例#1
0
        private void btnDownload_Click(object sender, EventArgs e)
        {
            Mapper map = new Mapper();

            string selected = lbThemes.SelectedItem.ToString();

            string loaded = map.LoadLine(@"bin\file\w7links.txt", selected);
            string[] LoadedContent = loaded.Split(';');
            string link = LoadedContent[1];

             url = link;
             WebClient webClient = new WebClient();

             webClient.DownloadFileCompleted += new AsyncCompletedEventHandler(Completed);
             webClient.DownloadProgressChanged += new DownloadProgressChangedEventHandler(ProgressChanged);
             webClient.DownloadFileAsync(new Uri(url),selected + ".tar.gz");
        }
示例#2
0
        private string[] LoadThemeList()
        {
            Mapper load = new Mapper();

            string content = load.Load(@"bin\file\w7links.txt");

            string[] ThemeList = content.Split(';');

            return ThemeList;
        }