Collection Of Interfaces (plugin System)

Mar 8, 2012

I am trying to make a plugin system in vb.net and i am using interfaces to do that. I have managed to implement the plugins but now i am having problems with setting the plugins in a dictionary or some sort of array.

The system is simple. I have the main application and i have plugins. The application needs 2 mandatory plugins and that is data and authentication. Other plugins are free to use so i have 3 interfaces. Data, Authentication and CustomPlugins.

I load the plugins with this

CODE:

It works fine like this but i want to make a collection of plugins because i don't know how many plugins the customer make. So initially i thought to make a collection

CODE:

But that doesn't work. The main focus is to load as many plugins as i like but have then in some sort of array. A dictionary would be perfect but is not a must.

View 2 Replies


ADVERTISEMENT

Define A Variable That Is A Collection Of Interfaces?

May 6, 2010

I want to define a variable that is a collection of interfaces - it could be any interface that is defined for use in my app.

e.g. Dim x as New List(Of InterfaceBase)

Is there a base type for all interfaces that I can use for InterfaceBase?

View 1 Replies

Plugin System In .net?

Jun 1, 2011

Is there a significant enough difference with .NET from regular native code to maketraditional plugin systems not very useful? Either way, there must be some system for making a program extensible after it is compiled. To allow third party development withoureleasing the source code. Anyone have info on this? I said .NET, but of course specifically I mean Visual Basic

View 2 Replies

Create A Plugin System For An Application?

May 14, 2009

i want to implement in a program. I'm not asking for code just some advice and maybe a link or 3 to useful pages on the internet.I want to create a plugin system for an application that i want to make. The idea for the plugin system is based on the following...

1-Some graphics editing programs have what i think is called a filter/effects chain. its where you make a list of filters and settings that the program runs to edit the image.

2-In yahoo pipes you take small parts and use them to complete tasks for you mashup (like pulling all the images returned in a search and displaying them).

The system i want advice on is basically a plugin chain system modeled after these 2 idea's where the user selects plugin's and forms a chain out of them.for instance if i wanted to display a picture then i would form a chain of plugins like this

legend:[(inputs)what it does(outputs)]

[show open dialog plugin(output filepath)] -> [(filepath input)open picture plugin(output bitmap object)]->[(input bitmap object)Display a picture plugin(make a form for display)]

The code for the task's will of course be in the plugin's.The problem is i have never done any plugin system before. the hardest part i need help with is getting the plugin's loaded and sending the output's to each other. Also another problem i think is that the plugin's could be for anything (parsing text, displaying a picture, opening a url, downloading a file, etc, etc)Again I'm not asking for code just advice and some useful links to information.

View 1 Replies

Make A Plugin Type System For Themes?

Aug 16, 2011

I am looking for the best way to make a plugin type system for themes. have allow users to create custom GDI based controls in a dll plugin that is to be able to be switched on runtime by users. My issue is there is no way to have a dynamic inheritance so how can I make it so the controls show in the toolbox and can be changed on runtime?

View 5 Replies

VS 2008 Extremely Basic MDI Plugin System

Jul 8, 2010

I've got an MDI form with a menustrip that already detects all .dll files in a folder and adds them to the menu to show the user which plugins are available. The thing is that I don't know what to do from here on out...

I'd like to be able to update my program without having to stifle through all my code (it's a very big program) and be able to create basic new features through external DLLs. It's extremely useful for users to make their own features too

Anyway, what a plugin would look like is most likely just a form with controls on it that the user makes themselves in VB. I'd like the plugin to activate through an init() sub within the plugin by clicking on the menu item shown in my MDI form.

I kind of started with my own code but it didn't really get anywhere:

ListFilesInMenuStrip(PluginsToolStripMenuItem, App_Path() & "Plugins")
For Each c As Control In Me.Controls
If TypeOf c Is MenuStrip Then

[Code]....

...Where ListFilesInMenuStrip() is my function to add all the DLLs to the menu and App_Path is just a shortcut function which serves the same purpose as VB6's App.Path() class.

I've also done research but only came across all their weird complex CodeDom and other weird things...This seems so simple but I just can't wrap my mind around it :I

View 4 Replies

Create A Plugin System Where Plugins Can Be Dynamically Loaded?

Dec 21, 2008

I am trying to create a plugin system where plugins can be dynamicly loaded (we don't know how many there are, what their classes are called, ...)This is sample code for a plugin:

Code:
Public Interface IPlugin
Sub bla()
Function bla3() As String
End Interface

[code]....

This code SHOULD msgbox("yay") when it finds a type that implements my IPlugin interface. Yet it never finds one. I can't find what I did wrong. It gets to the debug.print("2"), but never gets past the "If GetType(IPlugin).IsAssignableFrom(t) Then".

View 4 Replies

VS 2008 - Implementing System To Check Whether Plugin Installed

Jul 8, 2009

I am trying to create a plugin system. I have the actual plugins working fine but now I want to implement a system that knows whether the plugin is installed or not. I can get the plugin name when the form is loaded (ex. "Plugin1"). I then want to check this against something to see if that specific plugin is already there (if not add it) and if it is there is it enabled. I was thinking of doing this with an xml file but thought that might be a lot of work reading and writing each value. I then thought of the My.Settings and was wondering if this is possible. I would want to create an "element" for the name and give it a value of either true or false.

View 10 Replies

Add Item To System.Collections.Specialized.String Collection When It Is Not Already There?

Dec 29, 2010

How can I have it so that you can add items to a System.Collections.Specialized.String Collection but only if it is not there already? I have already found the code, but deleted it and cannot remember it. It is something like[code]....

View 9 Replies

VS 2008 : System.Data.DataSet, Which Is Not A Collection Type

Dec 30, 2009

I am trying to export a dataset to a csv file

VB
Private Sub ExportDatasetToCsv(ByVal MyDataSet As DataSet)
Dim str As New StringBuilder
For Each dr As DataRow In MyDataSet

[code]....

I am getting an error on this line: For Each dr As DataRow In MyDataSet The error is Expression is of type 'System.Data.DataSet', which is not a collection type.

View 3 Replies

VS 2008 System.Collection.Hashtable In Project Settings?

Mar 24, 2010

I've defined a setting called CustomActions as a System.Collection.Hashtable. I also have a form with two textboxes (Name & CommandLine) that I want to add as a Key/Value pair to the CustomActions settingHowever, when I come to add the kvp to Hashtable I get the dreaded "Object reference not set to an instance of an object". I know what the error means I just don't see why it's relevant here.

Dim CustomActionForm As New DefineCustomAction
If CustomActionForm.ShowDialog = System.Windows.Forms.DialogResult.OK ThenMy.Settings.CustomActions.Add(CustomActionForm.txt_CAName.Text,

[code].....

View 1 Replies

Working With System.collection.generic.Ienumerable/XML Linq Queries?

Oct 22, 2009

This is really a continuation from my earlier post. I've never worked with this datatype/collection (system.collection.generic.Ienumerable) before so I'm struggling to declare the query globally so I can reference the results within other sub routines/functions. I also am struggling to convert it to other types.how I can convert the collection of xml elements/system.collection.generic.Ienumerable into an xmltextreader (I know I will have to change the query below as it select the value of the node and not the node itself) I imagine by converting the query result to system.IO.stream My first port of call was MSDN but I find the material very difficult to understand for this particular subject.

[Code]...

View 3 Replies

Automatically Recognize And Handle Changes Of An Item In A "System.Collections.ObjectModel.Collection"

Feb 4, 2011

I wanted to create a custom control with a custom Item-Collection in it.(Similar to the ListView Items, but with other properties)I wrote a Class that holds properties of a single Item data (ClassItemData) and another class that "Inherits System.Collections.ObjectModel.Collection(Of ClassItemData)". The Collection class contains a public event (ItemCollectionChanged) which is raised when "ClearItems", "InsertItem", "RemoveItem" or "SetItem" is called. (I used "Overrides" on all these functions and added the Raise Event to them.) The event is handled in the custom control itself and causes the control to refresh/repaint itself. The collection class contains also "Default Public Overloads ReadOnly Property Item(ByVal index As Int32) As ClassItemData" which returns the Item at the speciefic index.

The control refreshes itself when I place the control on a form and use code like: ControlName.Items.Add("TestItem") Unfortunately the control does not refresh itself when I use: ControlName.Items.Item(0).Visible = False The value of the Item itself has changed after this, but the control does know about the changes and does not refresh itself. If I do a manual repaint/refresh of the control, it looks all fine, but it does not work automatically. Does anyone know, what I have to add, so I can handle an event or something in the control when a property in the ItemData class has changed? How do I recognize changes in existing items and raise an event in the custom event?

View 6 Replies

Error - "Collection Was Modified; Enumeration Operation May Not Execute" In A Client System

Nov 1, 2011

I have a logout menu option in my MDI application. On log out I want to close all open forms. currently i am using following code snippet to achieve this;

For Each f As Form In My.Application.OpenForms
If f.Name = Me.Name Then
For Each child As Form In f.MdiChildren

[code]....

It is working perfect in my test environment, even though I expected For Each loop will throw "Collection was modified; enumeration operation may not execute" exception. since on each child form Close() calls, f.MdiChidren collection get modified, that surprised me a lot. Can anybody tell me why it's not throwing that exception?However it throws "Collection was modified; enumeration operation may not execute" in a client system.

View 1 Replies

.net - Storing Subcollections (filtered Versions Of The Main Collection) Inside The Collection As Cache?

Jan 15, 2010

Is it good practice to store sub-collections of item X inside a parent collection of item X for caching 'filter-queries' which are performed on the parent collection? (They won't be used together (as in color AND type).) Or is it also ok to just Loop over the collection and return the correct entities in a temporary collection?

[Code]...

View 1 Replies

C# - Edit List Collection : Error Note Collection Was Modified - Enumeration Operation May Not Execute?

Sep 7, 2011

I have the following classes:

Product, Service and OrderItem

Product and Service must inherit OrderItem. So basically I want to store OrderItem object in my shopping cart and these object are store in a list.

Public MustInherit Class OrderItem
Private m_enuItemType As TypeOfItem = TypeOfItem.None
Private m_strUserID As Integer[code].....

View 1 Replies

How To Develop Plugin

Dec 15, 2010

i need to develop a plugin to evaluate web interfaces. Can someone guide me about how to develop plugin in vb 2008 express.

View 4 Replies

IDE :: Create A Plugin For VB 6?

Jan 19, 2010

I am working on a migration project to convert a Visual Basic 6 system to a new platform. To make life easier for the programmers I would like to develop some plug-ins for the Microsoft Visual Basic 6 IDE. But until now I've found only information about using vb6 to write plug-ins for other programs. how to create a plug-in for the Microsoft Visual Basic 6 IDE (SP6)?

View 3 Replies

Make A Plugin Written In .NET?

Jun 9, 2011

I've got a C#.NET background and due to circumstances I'm trying to make a plugin written in VB.NET. I've created a new class project which gives me a DLL. This class implements a C# interface which all works.My only question is this... In my C# code I've got an implemented DLL (which loads at runtime) with the following declaration before the class...

[Plugin(PluginType.Storage)]
public class XmlPlugin<T> : IStoragePlugin<T>
{

[code]....

How do I write [Plugin(PluginType.Storage)] in VB syntax?

View 2 Replies

Make A Way For Webbrowser To Be Able To Add Plugin?

Aug 11, 2009

make a way for my webbrowser to be able to add plug in?

View 4 Replies

Plugin That Loads Mdi Form?

Oct 28, 2009

Ive created an application that reads plugins but I can't figure out a way of making a form thats housed in the plugin into an MDI for my existing application.[code]...

View 3 Replies

Use Studio Mysql Plugin?

Dec 4, 2007

I've been reading a lot of the posts but i just can't seem to get mine to work,What am i suppose to fill in under Server Name? i'm using my godaddy's free hosting account's mysql but i can't seem to find any thing that'll teach me how to use that exactly it just keep saying 'unable to connect to any of the specified mysql hosts' am i filling in something wrongly?

View 5 Replies

VS 2008 Plugin / Mod In Program

Oct 4, 2010

For many Java games/programs I use, you can download plugins/mods. Now I'm wondering if this is possible in VB?

View 3 Replies

Make A Custom Collection That Take Advantage Of The Collection Editor?

Feb 8, 2010

I have been researching for a couple of days now and to no avail. Does Anyone know how to make a custom collection that take advantage of the collection editor? I would like to be able to have 3 Color Values, 1 Boolean and 1 String.

View 15 Replies

A Plugin Architecture In .net And Handling Events

Nov 5, 2009

I need to write an app that that will iterate over our database, and perform various anaylsis on each record. In order to do this (partially for the learning exercise in creating plugin support) I want to use a Plugin model.

Currently, I have a simple Interface in my main app, which plugins can Implement. My app then loads all DLL's in a folder looking for ones implementing the Interface.

As you can see in the pseudo-code below, I have to keep performing a loop through all loaded plugins calling the process methods.

Sub ProcessData()
For Each Record In MyDataSet
For Each Plugin In MyPluginCollection

[Code].....

View 3 Replies

Debugging Class Library Plugin?

Jun 1, 2010

I have a windows form application in which I'm attempting to utilize a plugin (class library). In the code I have it load the assembly from a dll file, which means I have not been able to debug. Furthermore I have not found out how to compile the library so I've had to use the debuged dll version for testing. I've run into a bug in which I create a new object and send that data through an interface to the plugin in an attempt to retrieve a blank slate group box from the plugin. However instead of reading the parameter as a new object i managed to step through the code once (don't ask me how, I don't know and I haven't been able to repeat it) and it appeared that the code was registering the parameter as "nothing" thus why I received a null reference error in the main program.

View 2 Replies

Explorer Thumbnail Handling Plugin?

Sep 20, 2010

ve been exploring with IThumbnailProvider in VB10. The first attempt I made was to handle MKV file thumbnails. I made the library and everything looked OK when I tested it against MS's Thumbnail app that came in the Windows API pack. Then I attempted to implement it on my computer, and every single thumbnail in the OS broke. Not a single thumbnail was generated by the system. So, after a bunch of trying to rescue thumbnails, I reformatted, reinstalled Windows, and got everything back to normal.

Today, I tried again. This time, using BLP files which are often used in Blizzard games (Warcraft III in particular). To avoid the same issue, I threw the compiled result into a Virtual Machine and tested it there, and it looked lovely. After a bit of experimenting and tweaking, I got it exactly as I wanted, cleaned the thumbnail cache, tested it one last time, and then installed it on my actual PC. Bam, all thumbnail generation is broken again.

View 2 Replies

Get A .NET Plugin For CodeRay (or Any .NET Syntax Highlighting)?

Sep 10, 2010

I recently set up a Redmine server for my time. Redmine's Wiki uses CodeRay for syntax highlighting. However, most of my team prefers to code in VB.NET, which CodeRay doesn't support.Are there any plugins out there that offer syntax highlighting for VB.NET in CodeRay? If not in CodeRay, maybe through some other library (that could be integrated into Redmine)?

View 2 Replies

Make A Trackbar With Vlc Activex Plugin?

Apr 29, 2010

i am wondering how to make a trackbar with vlc activex plugin i have it part working but i want to make it more accurate meaning how do i make it display the exact seconds then it is right now here is the code

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
With TrackBar1
.Minimum = "0"

[code]....

that is the timer i am using to set the track bar's values and the trackbar1 to take the time and play it at that time?

View 1 Replies

Microsoft Word Plugin For A SQL Database?

Jun 16, 2010

I would like to know if it's possible to create a microsoft word plugin via visual basic that when activated from a visual basic application did the following:

Creates a word document with a pre-made template Connects to an access (or MS SQL) Database Obtain ID from the application from which it was called The fieds related to the ID provided are filled in the spaces where they should go Show the document for it to be inspected by the user who initiated the request

That's pretty much it, I have no clue on how word plugins are made through visual basic... I've created the visual basic application that's inteneded to communicate with the plugin. So, could you help me find some good tutorials, tips or a place to start?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved