night feb-07
parent
973ddb478f
commit
3efcb311ba
|
@ -34,20 +34,9 @@ namespace SamplePlugin
|
||||||
this.commandManager = commandManager;
|
this.commandManager = commandManager;
|
||||||
|
|
||||||
var pluginList = pluginInterface.InstalledPlugins;
|
var pluginList = pluginInterface.InstalledPlugins;
|
||||||
foreach (var plugin in pluginList)
|
foreach (var command in commandManager.Commands)
|
||||||
{
|
{
|
||||||
var assemblyName = plugin.GetType().Assembly.GetName().Name;
|
log.Information($"{command}");
|
||||||
if (
|
|
||||||
!assemblyName.IsNullOrWhitespace()
|
|
||||||
&& !assemblyName.Equals(plugin.InternalName, StringComparison.Ordinal)
|
|
||||||
)
|
|
||||||
{
|
|
||||||
log.Warning(
|
|
||||||
"Miss-match: Name: {plugin} AssName: {assemblyName}",
|
|
||||||
plugin.Name,
|
|
||||||
assemblyName
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
configuration =
|
configuration =
|
||||||
|
@ -81,12 +70,12 @@ namespace SamplePlugin
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
this.windowSystem.RemoveAllWindows();
|
windowSystem.RemoveAllWindows();
|
||||||
|
|
||||||
ConfigWindow.Dispose();
|
ConfigWindow.Dispose();
|
||||||
MainWindow.Dispose();
|
MainWindow.Dispose();
|
||||||
|
|
||||||
this.commandManager.RemoveHandler(CommandName);
|
_ = commandManager.RemoveHandler(CommandName);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnCommand(string command, string args)
|
private void OnCommand(string command, string args)
|
||||||
|
@ -97,7 +86,7 @@ namespace SamplePlugin
|
||||||
|
|
||||||
private void DrawUI()
|
private void DrawUI()
|
||||||
{
|
{
|
||||||
this.windowSystem.Draw();
|
windowSystem.Draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DrawConfigUI()
|
public void DrawConfigUI()
|
||||||
|
|
Loading…
Reference in New Issue