More async init, add proper NLog target for WPF and free console in UI mode

This commit is contained in:
John Gross
2018-01-21 21:23:11 -08:00
parent c5e1dd7c3a
commit 0328876d50
12 changed files with 133 additions and 19 deletions

View File

@@ -38,9 +38,18 @@ namespace Torch.Server.Views
public void BindServer(ITorchServer server)
{
_server = server;
_plugins = _server.Managers.GetManager<PluginManager>();
var pluginManager = new PluginManagerViewModel(_plugins);
DataContext = pluginManager;
_server.Initialized += Server_Initialized;
}
private void Server_Initialized(ITorchServer obj)
{
Dispatcher.InvokeAsync(() =>
{
_plugins = _server.Managers.GetManager<PluginManager>();
var pluginManager = new PluginManagerViewModel(_plugins);
DataContext = pluginManager;
});
}
private void OpenFolder_OnClick(object sender, RoutedEventArgs e)