private void AddBtn_OnClick(object sender, RoutedEventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd.Filter = "DLL|*.dll"; if (ofd.ShowDialog() == true) { try { Plugin plugin = new Plugin(ofd.FileName); _vstHost.UsedPluginCollection.Add(plugin); } catch (Exception ex) { MessageBox.Show("Can't open plugin."); } } }
public void Add(Plugin plugin) { _plugins.Add(plugin); }