Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
 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);
     }
 }
Exemplo n.º 3
-1
 public void CloseTab(Plugin plugin)
 {
     Plugins.Remove(plugin);
     plugin.Dispose();
 }