add progress ability to extension

This commit is contained in:
Michael Nolan 2021-12-08 23:37:39 -06:00
parent be05fbb852
commit 31366d7206
8 changed files with 8 additions and 6 deletions

View File

@ -170,14 +170,12 @@ namespace TYTD
b.Append($"<a href=\"{link.Value}\">{link.Key}</a><br>");
}
b.Append("</td></tr>");
Dictionary<string, string> templating = new Dictionary<string, string>();
templating.Add("Items", b.ToString());
Page= Templating.RenderFile(Path.Combine("WebSite", "extensions.html"),templating);
}
internal static void Load(string dll,string confpath)
internal static void Load(StringBuilder b,string dll,string confpath)
{
var asm=Assembly.LoadFrom(dll);
StringBuilder b = new StringBuilder();
foreach (var item in asm.GetTypes())
{
if(typeof(Api).IsAssignableFrom(item))
@ -193,6 +191,7 @@ namespace TYTD
}
public static void Init()
{
StringBuilder b = new StringBuilder();
string root = Path.Combine(Environment.CurrentDirectory,"config", "apidll");
string appconfroot = Path.Combine(Environment.CurrentDirectory,"config", "apistore");
foreach(var dir in Directory.GetDirectories(root))
@ -203,9 +202,12 @@ namespace TYTD
if(File.Exists(dllpath))
{
Directory.CreateDirectory(confpath);
Load(dllpath, confpath);
}
}
Load(b,dllpath, confpath);
}
}
Dictionary<string, string> templating = new Dictionary<string, string>();
templating.Add("Items", b.ToString());
Page = Templating.RenderFile(Path.Combine("WebSite", "extensions.html"), templating);
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.