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)
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$
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$