Aşağıdaki gibi yapabilirsin yani mantık bu. Tabi tekrarlayan kodları kullanmamalısın normalizasyonunu buna göre yaparsın.
// Program her başladığında dosyaları indir
try
{
Directory.CreateDirectory(Application.StartupPath + @"Locale");
WebClient wClient = new WebClient();
if ((double)new WebClient("http://www.okolay.net/serhat/ps2/locale/en_us_data.dat").OpenRead() != System.IO.FileInfo("en_us_data.dat").Lenght)
{
if (msgBox("Dosya Boyutu farklı değiştirilsin mi ? ", yesNo, question) == DialogResult.Yes)
wClient.DownloadFile("http://www.okolay.net/serhat/ps2/locale/en_us_data.dat", FilePath1);
}
if ((double)new WebClient("http://www.okolay.net/serhat/ps2/locale/Geo-Md.ttf").OpenRead() != System.IO.FileInfo("Geo-Md.ttf").Lenght)
{
if (msgBox("Dosya Boyutu farklı değiştirilsin mi ? ", yesNo, question) == DialogResult.Yes)
wClient.DownloadFile("http://www.okolay.net/serhat/ps2/locale/Geo-Md.ttf", FilePath3);
}
if ((double)new WebClient("http://www.okolay.net/serhat/ps2/locale/en_us_data.dir").OpenRead() != System.IO.FileInfo("en_us_data.dir").Lenght)
{
if (msgBox("Dosya Boyutu farklı değiştirilsin mi ? ", yesNo, question) == DialogResult.Yes)
wClient.DownloadFile("http://www.okolay.net/serhat/ps2/locale/en_us_data.dir", FilePath2);
}
// Dosya indirme başarılı olursa uyar
MessageBox.Show("TEBRİKLER: Dil dosyaları başarıyla indirildi!", "Dil dosyaları indirildi", MessageBoxButtons.OK, MessageBoxIcon.Information);
}