public Plugin LoadPlugin(string assemblyName, string typeName) { Start(); OpenPluginLoader(); var contract = _pluginLoader.LoadPlugin(assemblyName, typeName); var remoteControl = FrameworkElementAdapters.ContractToViewAdapter(contract); var plugin = new Plugin(remoteControl) { Title = GetTitle(typeName) }; ++_refCount; plugin.Disposed += OnPluginDisposed; return plugin; }
private void Load() { try { var pluginHost = new PluginHostProxy { Is64Bit = (Bitness == 64) }; var plugin = pluginHost.LoadPlugin(AssemblyName, ClassName); Plugins.Add(plugin); SelectedPlugin = plugin; } catch (Exception ex) { MessageBox.Show(ex.ToString(), "Error", MessageBoxButton.OK, MessageBoxImage.Error); } }
public void CloseTab(Plugin plugin) { Plugins.Remove(plugin); plugin.Dispose(); }