コード例 #1
0
ファイル: LogParser.cs プロジェクト: nwalker/tenhouviewer
        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);
            }
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: nwalker/tenhouviewer
        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!");
        }