VB.NET

Xlobby plugin development

Postby art on Wed May 10, 2006 10:37 pm

fletch wrote: ... The download above appears to be corrupt. ...


I don't know why those zip files get corrupted (that's not the first time) :x ..
Anyway, here is the code:
Code: Select all
Imports XPluginSDK

Public Class xlobbyTestPlugin
    Implements XPlugin

#Region "xlobby members"

    Private xhelper As XPluginHelper

    Public Function GetDescription() As String Implements XPluginSDK.XPlugin.GetDescription
        Return "xlobbyTestPlugin-Description"
    End Function

    Public Function GetName() As String Implements XPluginSDK.XPlugin.GetName
        Return "xlobbyTestPlugin-Name"
    End Function

    Public Function GetPluginType() As String Implements XPluginSDK.XPlugin.GetPluginType
        Return "xlobbyTestPlugin-Type"
    End Function

    Public Function GetStatus() As String Implements XPluginSDK.XPlugin.GetStatus
        Return ""
    End Function

    Public Function GetVariable(ByVal name As String) As Object Implements XPluginSDK.XPlugin.GetVariable
        Return ""
    End Function

    Public Sub SetHelper(ByVal xhelper As XPluginHelper) Implements XPluginSDK.XPlugin.SetHelper
        Me.xhelper = xhelper
    End Sub

    Public Sub ShowDialog() Implements XPluginSDK.XPlugin.ShowDialog
        '\\ show setup form here
    End Sub

    Public Function GetCommands() As System.Collections.ArrayList Implements XPluginSDK.XPlugin.GetCommands
        Dim commands As ArrayList = New ArrayList
        commands.Add("Test_Command")
        Return commands
    End Function

    Public Sub Execute(ByVal command As String) Implements XPluginSDK.XPlugin.Execute
        Dim comm As String() = command.Split(" ")
        If comm(0) = "Test_Command" Then
            xtest(comm(1))
        End If
    End Sub

#End Region

#Region "plug-in members"

    Private Sub xtest(ByVal myArg As String)
        MsgBox(myArg)
    End Sub

#End Region

End Class
Last edited by art on Thu Aug 31, 2006 9:50 pm, edited 1 time in total.
art
 
Posts: 284
Joined: Sat Mar 20, 2004 8:40 am
Location: Allen, TX

Postby fletch on Thu May 11, 2006 2:34 am

Thanks, that works great. Now it is time to learn the differences between VB6 and VB.Net.
fletch
 
Posts: 64
Joined: Sun Feb 05, 2006 1:11 am
Location: Castle Rock, CO

Postby dalanik on Tue May 16, 2006 8:36 pm

Speaking of VB.NET and plugins, is it possible to get actual screen/overlay name from a plugin? I just coulfn't find anything in the docs...

D.
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic

Postby m_ski on Wed May 17, 2006 11:28 am

m_ski
 
Posts: 204
Joined: Wed Dec 08, 2004 7:57 am
Location: Kent, United Kingdom

Postby dalanik on Wed May 17, 2006 12:19 pm

Cool, thanx, this solves half the problem for me :-) And the other half are overalys - and if I'm not mistaken XScriptNG also has the ability to add event handler to check for overlay open/close???

D.
dalanik
 
Posts: 885
Joined: Mon Apr 19, 2004 12:35 pm
Location: Prague, Czech Republic

Previous