VB.net (1 Viewer)

reverson1

Portal Pro
May 23, 2006
88
4
Williamsburg,VA
Home Country
United States of America United States of America
Got a couple more questions now....

I've been able to compile it and it shows up in the menu but for the life of me I can't get it to load the screen when I select my plugin.

Just so you know I did change the <filename> to myGames.xml like it says in the tutorial, but it doesn't do anything other than restart the little animation at the top of the screen.

Also, how can I have my plugin not showup in the home menu? If I set it to false in the GetHome function then the plugin doesn't showup anywhere.

One other little issue, which may be the reason all of this is happening, the plugin is showing up as a process plugin and I'm assuming that I need it to show up as a window plugin like it says in the tutorial.

Any insight I can get on this will be greatly appreciated, I'm pretty much just banging my head against the wall with this.

Thanks
Richard
 

mPod

Portal Pro
January 26, 2005
2,084
3
Berlin
Home Country
Germany Germany
GUIWindow.GetID is missing.

C# code:
Code:
		public override int GetID
		{
			get
			{
				return windowID;
			}
		}
 

slapout

Portal Member
May 8, 2006
7
0
I know this isn't the proper place to ask VB.Net questions, but does every function in the plugin class have to explictly state which function it implements? (Like the Description function stating "Implements MediaPortal.GUI.Library.ISetupForm.Description")
 

samuel337

Portal Pro
August 25, 2004
772
0
Melbourne, Australia
slapout said:
I know this isn't the proper place to ask VB.Net questions, but does every function in the plugin class have to explictly state which function it implements? (Like the Description function stating "Implements MediaPortal.GUI.Library.ISetupForm.Description")

Yes as VB.NET only allows explicit interface implementation. I'm pretty sure anyway. C# however, offers both implicit and explicit interface implementation. I don't see the advantage in doing it implicitly though, seems to make the code harder to read.

Sam
 

reverson1

Portal Pro
May 23, 2006
88
4
Williamsburg,VA
Home Country
United States of America United States of America
Is there a sdk for MediaPortal or at least some basic documentation for the api?

I've looked at quite a few of the screen files and the methods available in the core and I don't really see how it all ties together. Some of the screens use the list control, others just have a simple button, and most of the screen files don't look anything at all like they do in MediaPortal. I don't know, it just seems unnecessarily complicated.

I realize there probably aren't very many plugins written in vb but if someone could point me to a basic sample of how to populate a menu I can start to move forward on this. Also, is it possible to use images on a menu and still be able to use the (un)selected textures?

I'm sure I'm missing something simple here so any help would be greatly appreciated.

Thanks,
Richard
 

reverson1

Portal Pro
May 23, 2006
88
4
Williamsburg,VA
Home Country
United States of America United States of America
Ok I've played around with this some more and I've managed to populate the subitems. But they don't display at all for some reason.

Can someone please help me figure out what I'm missing?

Here's the code I'm working with:

Code:
        Dim Men As MediaPortal.GUI.Library.GUIButtonControl
        Dim Itm As MediaPortal.GUI.Library.GUIListItem
        Dim x As Integer

        Men = GetControl(24)
        Men.Visible = True
        MediaPortal.GUI.Library.GUIButtonControl.ClearControl(GetID, Men.GetID)

        For x = 0 To 10

            Itm = New MediaPortal.GUI.Library.GUIListItem("test" & x)
            Men.AddSubItem(Itm)

        Next
        Itm = Men.GetSubItem(0)
        MsgBox(Itm.Label)

        Itm = Nothing
        Men = Nothing

I've also tried using the Add method, but they are not selectable and appear to have to be manually positioned which I'd rather not do. It makes more sense to me for the positioning to be handled by the screen file.
 

Users who are viewing this thread

Top Bottom