public bool Download(string Hash, string Dir) { if (!Directory.Exists(Dir)) Directory.CreateDirectory(Dir); Downloader D = new Downloader(Hash); string FileName = GetFileName(Hash, Dir); if (File.Exists(FileName)) { return true; } else { return D.Download(FileName); } }
static void DownloadHash(string Hash) { string FileName = Hash + ".xml"; Console.Write("Downloading game: " + Hash); Tenhou.Downloader D = new Tenhou.Downloader(Hash); if (!D.Download(FileName)) { Console.WriteLine(" - error!"); return; } Console.WriteLine(" - ok!"); }