| |||||||
| Plugins Plugins developed and maintained by users. Want to create your own plugin? Start a thread in here. |
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Portal Member Join Date: May 2005 Location: NYC
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
| 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
P.S. I would use C# but VB is just so much easier to write. DAMN M$
__________________ GHackett - NYC ----------------------------------- Temp Rig |
| | |
| | #4 (permalink) |
| Portal Member Join Date: May 2005 Location: NYC
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
| 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 |
| | |
![]() |
| Bookmarks |
| Tags |
| noob, plugin, question, writing |
| Thread Tools | |
| Display Modes | |
| |
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 |