Commit 5139a937 authored by nanahira's avatar nanahira

download at background

parent ee2c5cda
...@@ -522,10 +522,20 @@ public class Program : MonoBehaviour ...@@ -522,10 +522,20 @@ public class Program : MonoBehaviour
if(File.Exists("cdb/strings.conf")) if(File.Exists("cdb/strings.conf"))
File.Delete("cdb/strings.conf");*/ File.Delete("cdb/strings.conf");*/
HttpDldFile httpDldFile = new HttpDldFile(); (new Thread(() => {
httpDldFile.Download("http://koishi.222diy.gdn/ygopro/cards.cdb", "cdb/cards.cdb"); try
httpDldFile.Download("http://koishi.222diy.gdn/ygopro/lflist.conf", "cdb/lflist.conf"); {
httpDldFile.Download("http://koishi.222diy.gdn/ygopro/strings.conf", "cdb/strings.conf"); HttpDldFile httpDldFile = new HttpDldFile();
httpDldFile.Download("http://koishi.222diy.gdn/ygopro/cards.cdb", "cdb/cards.cdb");
httpDldFile.Download("http://koishi.222diy.gdn/ygopro/lflist.conf", "cdb/lflist.conf");
httpDldFile.Download("http://koishi.222diy.gdn/ygopro/strings.conf", "cdb/strings.conf");
}
catch (Exception ex)
{
Debug.Log("UPDATE ERROR: " + ex.ToString());
}
})).Start();
} }
catch (Exception e) catch (Exception e)
{ {
......
...@@ -34,7 +34,7 @@ public class HttpDldFile ...@@ -34,7 +34,7 @@ public class HttpDldFile
} }
if (Path.GetExtension(filename).Contains("cdb")) if (Path.GetExtension(filename).Contains("cdb"))
{ {
client.Timeout = 5000; client.Timeout = 30000;
} }
if (Path.GetExtension(filename).Contains("conf")) if (Path.GetExtension(filename).Contains("conf"))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment