Author Topic: Plugin in Vb.net  (Read 1558 times)

Askerion

  • Newbie
  • *
  • Posts: 19
Plugin in Vb.net
« on: October 28, 2014, 05:10:06 AM »

Hello, it is possible to program a plugin in vb.net?

Askerion

  • Newbie
  • *
  • Posts: 19
Re: Plugin in Vb.net
« Reply #1 on: October 28, 2014, 06:34:52 AM »
This is my code

Code: [Select]

'*****************************************************************************\
' * IceChat 9 Internet Relay Chat Client
' *
' * Copyright (C) 2011 Paul Vanderzee <snerf@icechat.net>
' *                                    <www.icechat.net>
' * This program is free software; you can redistribute it and/or modify
' * it under the terms of the GNU General Public License as published by
' * the Free Software Foundation; either version 2, or (at your option)
' * any later version.
' *
' * This program is distributed in the hope that it will be useful,
' * but WITHOUT ANY WARRANTY; without even the implied warranty of
' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
' * GNU General Public License for more details.
' *
' * You should have received a copy of the GNU General Public License
' * along with this program; if not, write to the Free Software
' * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
' *
' * Please consult the LICENSE.txt file included with this project for
' * more details
' *
'\*****************************************************************************
Imports System.Windows.Forms
Imports System.Xml.Serialization
Imports System.Collections
Imports System.IO
Imports System.Text.RegularExpressions

Namespace IceChatPlugin


    Public Class Plugin
        Inherits IPluginIceChat





        'all the events get declared here, do not change
        Public Overrides Event OnCommand As OutGoingCommandHandler

        Private m_Name As String
        Private m_Author As String
        Private m_Version As String

        Public Overrides ReadOnly Property Name() As String
            Get
                Return m_Name
            End Get
        End Property
        Public Overrides ReadOnly Property Version() As String
            Get
                Return m_Version
            End Get
        End Property
        Public Overrides ReadOnly Property Author() As String
            Get
                Return m_Author
            End Get
        End Property




        Public Sub New()
            'set your default values here
            m_Name = "Default Plugin"
            m_Author = "Default Author"
            m_Version = "1.0"
        End Sub

        'declare the standard methods

        Public Overrides Sub Dispose()

        End Sub

        Public Overrides Sub Initialize()

        End Sub

        'if you want to add a new method to override, use public override
    End Class

End Namespace


but this line give me an error
Public Overrides Event OnCommand As OutGoingCommandHandler

Can anyone help me, please

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Plugin in Vb.net
« Reply #2 on: October 28, 2014, 12:24:21 PM »
You can ignore the error.
The IceChat God

Askerion

  • Newbie
  • *
  • Posts: 19
Re: Plugin in Vb.net
« Reply #3 on: October 28, 2014, 11:43:45 PM »
I can not compile the DLL, because of this error

Error 2 "override" is not valid in an event declaration

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Plugin in Vb.net
« Reply #4 on: October 30, 2014, 12:18:31 PM »
Just remove that line , comment it out.
It works fine in C#
The IceChat God

Askerion

  • Newbie
  • *
  • Posts: 19
Re: Plugin in Vb.net
« Reply #5 on: November 02, 2014, 12:12:15 AM »
Yes, I had to remove the namespace. Now it works very well

Regards