diff --git a/TYTD.Api/MyClass.cs b/TYTD.Api/MyClass.cs index d8f9642..dbb84d5 100644 --- a/TYTD.Api/MyClass.cs +++ b/TYTD.Api/MyClass.cs @@ -27,12 +27,13 @@ namespace TYTD if(t == null) { t = new System.Timers.Timer(); + t.Elapsed += (sender, e) => + { + TimerElapsed(); + }; } t.Interval = timespan.TotalMilliseconds; - t.Elapsed += (sender, e) => - { - TimerElapsed(); - }; + t.Start(); } public bool TimerEnabled { get { if (t != null) { return t.Enabled; } else { return false; } } set { if (t != null) { t.Enabled = value; } } } @@ -127,8 +128,8 @@ namespace TYTD } public static void Init() { - string root = Path.Combine("config", "apidll"); - string appconfroot = Path.Combine("config", "apistore"); + string root = Path.Combine(Environment.CurrentDirectory,"config", "apidll"); + string appconfroot = Path.Combine(Environment.CurrentDirectory,"config", "apistore"); foreach(var dir in Directory.GetDirectories(root)) { string name = Path.GetFileName(dir); diff --git a/TYTD.Api/bin/Release/TYTD.Api.dll b/TYTD.Api/bin/Release/TYTD.Api.dll index 07c38ab..7b0a0aa 100644 Binary files a/TYTD.Api/bin/Release/TYTD.Api.dll and b/TYTD.Api/bin/Release/TYTD.Api.dll differ diff --git a/TYTD.Api/obj/Release/TYTD.Api.csprojAssemblyReference.cache b/TYTD.Api/obj/Release/TYTD.Api.csprojAssemblyReference.cache index 501566a..801d501 100644 Binary files a/TYTD.Api/obj/Release/TYTD.Api.csprojAssemblyReference.cache and b/TYTD.Api/obj/Release/TYTD.Api.csprojAssemblyReference.cache differ diff --git a/TYTD.Api/obj/Release/TYTD.Api.dll b/TYTD.Api/obj/Release/TYTD.Api.dll index 07c38ab..7b0a0aa 100644 Binary files a/TYTD.Api/obj/Release/TYTD.Api.dll and b/TYTD.Api/obj/Release/TYTD.Api.dll differ diff --git a/bin/Release/TYTD.Api.dll b/bin/Release/TYTD.Api.dll index 07c38ab..7b0a0aa 100644 Binary files a/bin/Release/TYTD.Api.dll and b/bin/Release/TYTD.Api.dll differ diff --git a/bin/Release/youtube-downloader.exe b/bin/Release/youtube-downloader.exe index 650a7a4..61e8d99 100644 Binary files a/bin/Release/youtube-downloader.exe and b/bin/Release/youtube-downloader.exe differ diff --git a/obj/x86/Release/youtube-downloader.csprojAssemblyReference.cache b/obj/x86/Release/youtube-downloader.csprojAssemblyReference.cache index 616d2cf..a2a5021 100644 Binary files a/obj/x86/Release/youtube-downloader.csprojAssemblyReference.cache and b/obj/x86/Release/youtube-downloader.csprojAssemblyReference.cache differ diff --git a/obj/x86/Release/youtube-downloader.exe b/obj/x86/Release/youtube-downloader.exe index 650a7a4..61e8d99 100644 Binary files a/obj/x86/Release/youtube-downloader.exe and b/obj/x86/Release/youtube-downloader.exe differ