Blupig has reported a post.
Reason:
Forum: Visual Basic .NET
Assigned Moderators: N/A
Posted by: Blupig
Original Content:
Reason:
Post: [TUT] Making SytheClient plugins with VB.netclear out the replies and change the title to "How to make Eternity Client plugins in .NET"
thanks
Forum: Visual Basic .NET
Assigned Moderators: N/A
Posted by: Blupig
Original Content:
IMPORTANT: All plugins you make MUST be in .NET framework 3.5, no older and no newer. If you own a copy of Visual Studio or have the trial, you can select your framework like so:
![]()
If you do not have a copy of Visual Studio, you'll need to download Visual Basic Express 2008 (NOT 2010 or 2005, 2008). You can get VB 2008 here.
1. Create a new project (select class file).
2. You'll need to have a few things within the class file. You'll need an author name, plugin description and plugin name. You'll also need to import the PluginPortal class library I made, available within the SytheClient download (if you navigate to your SytheClient install folder, it's right there; additionally, you can download it off our support site at).![]()
3. This is the code you need to have. Without it, your plugin will not work:
Code:Implements IPlugin Public ReadOnly Property Name() As String Implements IPlugin.Name Get Return "Your plugin name" End Get End Property Public ReadOnly Property Description() As String Implements IPlugin.description Get Return "Your plugin description" End Get End Property Public ReadOnly Property Author() As String Implements IPlugin.Author Get Return "Your name" End Get End Property Public Sub initialize(ByRef form As Object) Implements IPlugin.initialize ' ' This is where your code will start. If you want a ' ' form in your program, add a form like you normally would ' ' and add something similar to the following code: Dim MyForm As New Form1 ' ' The following line of code will be to incorporate your window ' ' within the client as all the other windows. ' ' It is completely optional. Form1.MdiParent = form MyForm.Show() End Sub
This is the import code:
Don't forget you'll need to set the PluginPortal.dll library as a reference first.Code:Imports PluginPortal.PluginPortal
Additionally, you can reference and import Eternity.exe (the client executable) to utilize all of its functions. For now, just poke around the classes, I'll make documentation later.
4. Once you've compiled, add the finished DLL file into the "plugins" folder in the SytheClient installation folder and run SytheClient. To select the plugin, click on the dropdown menu that says "Available plugins..." and select your plugin.
Still don't understand? Here's the source of "TestPlugin.dll".
Code:Imports PluginPortal.PluginPortal Public Class Class1 Implements IPlugin Public ReadOnly Property Name() As String Implements IPlugin.Name Get Return "TestPlugin" End Get End Property Public ReadOnly Property Description() As String Implements IPlugin.description Get Return "Tests plugin system" End Get End Property Public ReadOnly Property Author() As String Implements IPlugin.Author Get Return "Blupig" End Get End Property Public Sub initialize(ByRef form As Object) Implements IPlugin.initialize MsgBox("This is a test plugin.") End Sub End Class



























