MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal 1 » Community Skins and Plugins » Plugins


Plugins Plugins developed and maintained by users. Want to create your own plugin? Start a thread in here.

Reply
 
Thread Tools Display Modes
Old 2005-11-23, 15:30   #1 (permalink)
Portal Member
 
Join Date: May 2005
Location: NYC
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts


Default noob question - writing a plugin in VB

Hi guys, I know that C# is the preferred language for mediaportal, but I am, by trade, an ASP.NET Webb App programmer, and I work completely in VB. I'm trying to write my first plugin in VB mainly because I already have a bunch of code I want to use in it and I dont want to have to port it all over to C#. Anyway, I'm going over your "My First Plugin tutorial and encountering a problem. Can anyone with some VB experience help me out? I think that once I get past this hump, I can finish the rest on my own.

I ported the beginning of the OurPlugin code over to VB, but I'm having probles impletemnting some of the (all of the) functions without the override tag. VS is telling me that I need to implement the Overrideable functions Description(), Author(), etc... in order to implement ISetupForm, but I have implemented those classes. When I add the Overrides tag to any of those classes though, I get an error saying that there is no class to override.

here is my code (it currently does nothing)
Code:
Imports System
Imports System.Windows.Forms
Imports MediaPortal.GUI.Library

Namespace MyRandomVideo

    Public Class RandomVideo
        Inherits GUIWindow
        Implements ISetupForm

        Public Sub New()

        End Sub

#Region "ISetupForm Members"

        Public Function PluginName() As String
            Return "My Random Video"
        End Function

        Public Function Description() As String
            Return "Play Random Videos From Selected Folders"
        End Function

        Public Function Author() As String
            Return "GHackett"
        End Function

        Public Sub ShowPlugin()
            MessageBox.Show(Application.StartupPath)
        End Sub

        Public Function CanEnable() As Boolean
            Return True
        End Function

        Public Function GetWindowId() As Integer
            Return 5678
        End Function

        Public Function DefaultEnabled() As Boolean
            Return True
        End Function

        Public Function HasSetup() As Boolean
            Return True
        End Function

        Public Function GetHome(ByRef strButtonText As String, ByRef strButtonImage As String, ByRef strButtonImageFocus As String, ByRef strPictureImage As String) As Boolean
            strButtonText = PluginName()
            strButtonImage = String.Empty
            strButtonImageFocus = String.Empty
            strPictureImage = String.Empty
            Return True
        End Function

        Public Overrides Property GetID() As Integer
            Get
                Return 5678
            End Get
            Set(ByVal Value As Integer)

            End Set
        End Property

        Public Overrides Function Init() As Boolean
            Return Load(GUIGraphicsContext.Skin + "\MyRandomVideo.xml")
        End Function

#End Region


    End Class
End Namespace
VS 2003 puts a squggly blue line underneath ISetupForm at the top and gives me laundry list of errors when i try to compile telling me that I dont implement the proper functions. Any help would be appreciated.

P.S. I would use C# but VB is just so much easier to write. DAMN M$
__________________
GHackett - NYC
-----------------------------------
Temp Rig
ghackett is offline   Reply With Quote
Old 2005-11-23, 15:42   #2 (permalink)
Portal Member
 
Join Date: May 2005
Location: NYC
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts


Default Sorry

Sorry to waste your time guys, just found source for a VB plugin

thanks
__________________
GHackett - NYC
-----------------------------------
Temp Rig
ghackett is offline   Reply With Quote
Old 2005-12-02, 17:58   #3 (permalink)
Portal Member
 
Join Date: Sep 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts


Default Re: Sorry

Quote:
Originally Posted by ghackett
Sorry to waste your time guys, just found source for a VB plugin

thanks
Could you please tell everyone else where to find that source
weekendowel is offline   Reply With Quote
Old 2005-12-02, 18:01   #4 (permalink)
Portal Member
 
Join Date: May 2005
Location: NYC
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts


Default

Sure. I looked a couple threads down in this forum and someone was asking for a VB plugin and the were pointed here
http://nolanparty.com/mediaportal.so...content+plugin
__________________
GHackett - NYC
-----------------------------------
Temp Rig
ghackett is offline   Reply With Quote
Reply

Bookmarks

Tags
noob, plugin, question, writing

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
IPTV@UT Plugin moiristo Plugins 116 2008-10-06 22:32
Gathering topical infos about plugins (To: authors & use tomtom21000 Plugins 2 2006-02-05 00:20
Plugin example doesnt show in list Anonymous Plugins 5 2005-08-13 12:12
C#.NET Plugin Writing Tutorial jadz Plugins 26 2005-03-22 15:38


All times are GMT +1. The time now is 05:07.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress
Advertisement System V2.6 By   Branden