Esempio n. 1
0
        private void btn_revert_poly_Click(object sender, EventArgs e)
        {
            var filesToUpdate = new List <string>
            {
                "text\\monlist0-e.html",
                "text\\monlist-e.html"
            };

            foreach (var file in filesToUpdate)
            {
                var filePath = Path.Combine(this._config.InstallDir, file);

                var extension = Path.GetExtension(file);
                using (var client = new System.Net.WebClient())
                {
                    client.DownloadFileAsyncSync(
                        new Uri(this._config.UpdaterFilesRoot + file.Replace("\\", "/")),
                        filePath);
                }
            } //end for

            MessageBox.Show("Polymorph list will be reverted next time you click PLAY!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }