TYTD w api

This commit is contained in:
Michael Nolan 2021-12-07 22:34:43 -06:00
parent 0ba0d34596
commit 250b6e03bd
8 changed files with 7 additions and 6 deletions

View File

@ -27,12 +27,13 @@ namespace TYTD
if(t == null) if(t == null)
{ {
t = new System.Timers.Timer(); t = new System.Timers.Timer();
}
t.Interval = timespan.TotalMilliseconds;
t.Elapsed += (sender, e) => t.Elapsed += (sender, e) =>
{ {
TimerElapsed(); TimerElapsed();
}; };
}
t.Interval = timespan.TotalMilliseconds;
t.Start(); t.Start();
} }
public bool TimerEnabled { get { if (t != null) { return t.Enabled; } else { return false; } } set { if (t != null) { t.Enabled = value; } } } 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() public static void Init()
{ {
string root = Path.Combine("config", "apidll"); string root = Path.Combine(Environment.CurrentDirectory,"config", "apidll");
string appconfroot = Path.Combine("config", "apistore"); string appconfroot = Path.Combine(Environment.CurrentDirectory,"config", "apistore");
foreach(var dir in Directory.GetDirectories(root)) foreach(var dir in Directory.GetDirectories(root))
{ {
string name = Path.GetFileName(dir); string name = Path.GetFileName(dir);

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.