![]()


Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Chrisber« (22. Oktober 2009, 15:01)
|
|
Visual Basic Quellcode |
1 2 |
Dim plugin As New PluginLib.PluginLib("INIEdit.Export.KeyValue", "ExportKeyValue") plugin.LoadPlugin("INIEdit.Export.KeyValue.dll") |

OK. Und wieso braucht man bei deinem Plugin-System "System.Collections.Generic.KeyValuePair". Ich hab mir das Beispielprojekt mal angeschaut und ich finde es unübersichtlich.Ja.
Sonst wäre das ganze ja sinnlos. Das ist bei einem Pluginsystem Voraussetzung, um es Modular zu halten.
Gruß
|
|
Visual Basic Quellcode |
1 2 3 4 5 |
Dim X As Dictionary(Of String, PluginLib.Plugin) = PluginManager.GetPlugins() For Each Y As KeyValuePair(Of String, PluginLib.Plugin) In X ' Pluginname = Y.Key ' Plugin-Klasseninstanz = Y.Value Next |
Benutzerinformationen überspringen
Dabei seit: 10. Oktober 2009
Wohnort: k
Frühere Benutzernamen: m0nst3rkill3r
Zitat von »"http://forums.macrumors.com/showpost.php?s=9e0078570b2b62fd044cc1b13d212b09&p=4777525&postcount=1064"«
When talking about how apple cannot influence the future of computers, you also forgot to mention that the internet was created on a network of macs to start with. Thats why every online PeeCee has a MAC code. Even my PSP needs a MAC code to get online....
Benutzerinformationen überspringen
Dabei seit: 7. September 2009
Frühere Benutzernamen: CrashOverride2242


|
|
Visual Basic Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
Public Function ApplyInterfaceChanges(ByReference pForm As Form) As Boolean ' Beispiel: Rückgabe "True" wenn die DLL was verändert, sonst "False" ' Alle Controls durchlaufen und nach dem Control mit dem Namen "MenuObject" suchen For Each pControl In pForm.Controls ' Ist das gesuchte Control unser Hauptmenü? If pControl.ToString().Contains("MenuObject") Then ' Von "Object" zu "MenuStrip" casten, um es richtig verwenden zu können Dim menuObject As MenuStrip = DirectCast(pControl, MenuStrip) ' Neuen Eintrag erstellen Dim myEntry As ToolStripItem = New ToolStripItem() myEntry.Text = "Testeintrag" ' Dem Hauptmenü hinzufügen menuObject.Items.Add(myEntry) ' Da gefunden wurde, beenden und "True" zurückgeben Return True End If Next ' Kein Hauptmenü, also "False" Return False End Function |

Danke aber für das Beispiel.
)
War wohl wer anders 


Benutzerinformationen überspringen
Dabei seit: 14. Januar 2010
Wohnort: Lübeck
Frühere Benutzernamen: r3mote

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »r3mote« (21. März 2010, 18:02)
Benutzerinformationen überspringen
Dabei seit: 10. Oktober 2009
Wohnort: k
Frühere Benutzernamen: m0nst3rkill3r
|
|
Visual Basic Quellcode |
1 2 3 4 5 6 7 8 9 10 |
Dim Manager As New PluginLib.PluginLib("$plugin", "PluginLibTest") Manager.AddVariable("PluginName") Manager.AddVariableOptional("Version", "1.0.0.0") Manager.LoadPlugins("C:\Users\Chef\Documents\Visual Studio 2010\Projects\pluginlibuse\pluginlibuse\bin\Debug\Plugin\", IO.SearchOption.TopDirectoryOnly) For Each Plugin As KeyValuePair(Of String, PluginLib.Plugin) In Manager.GetPlugins() Dim X As Dictionary(Of String, PluginLib.MethodData) = Plugin.Value.GetMethods() For Each Y As Collections.Generic.KeyValuePair(Of String, PluginLib.MethodData) In X RichTextBox1.Text += Y.Key Next Next |
Zitat von »"http://forums.macrumors.com/showpost.php?s=9e0078570b2b62fd044cc1b13d212b09&p=4777525&postcount=1064"«
When talking about how apple cannot influence the future of computers, you also forgot to mention that the internet was created on a network of macs to start with. Thats why every online PeeCee has a MAC code. Even my PSP needs a MAC code to get online....
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Tsuyo« (25. Mai 2010, 16:50)