| |||||||
| Plugins Plugins developed and maintained by users. Want to create your own plugin? Start a thread in here. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| Portal Member Join Date: Mar 2008
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Country: | i m writing a plugin and i have some question please help me because i m trying for two week and i dont find a solution: 1. How can i Activate new window i use this Method GUIWindowManager.ActivateWindow(8110, true); but it didint work, i become a black window: This is the code for the second window what i try to call from the first window HTML Code: class Media2: GUIWindow
{
public Media2()
{
}
public override int GetID
{
get
{
return 8110;
}
set
{
base.GetID = value;
}
}
public override bool Init()
{
return Load(GUIGraphicsContext.Skin + @"\Oerflaeche2b.xml");
}
protected override void OnPageLoad()
{
MessageBox.Show("Oberflaeche2 " );
base.OnPageLoad();
}
protected override void OnPageDestroy(int new_windowId)
{
base.OnPageDestroy(new_windowId);
}
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType)
{
base.OnClicked(controlId, control, actionType);
}
public override bool OnMessage(GUIMessage message)
{
if (message.Message == GUIMessage.MessageType.GUI_MSG_ITEM_FOCUS || message.Message == GUIMessage.MessageType.GUI_MSG_ITEM_FOCUS_CHANGED)
{
}
return base.OnMessage(message);
}
}
please havent sonme one any idea, i m waiting Last edited by Zarra; 2008-04-02 at 16:20. Reason: Automerged Doublepost |
| | |
| |
| | #2 (permalink) |
| Portal Member Join Date: Aug 2006 Location: Kentucky Age: 23
Posts: 664
Thanks: 117
Thanked 83 Times in 44 Posts
Country: | To activate a second window from another one, you would do something like this. Media2 Media2 = new GUIWindowManager.GetWindow(8110) GUIWindowManager.ActivateWindow(8110) That should work for you. You may need to call Media2.Process in between those two as well, but I'm not positive if that's required. The syntax may be a bit off but you see what I'm getting at. Last edited by jburnette; 2008-04-03 at 14:53. |
| | |
| | #5 (permalink) |
| Portal Member Join Date: Mar 2008
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Country: | yes i have a second XML Datei with the same ID <?xml version="1.0" encoding="utf-8" standalone="yes"?> <window> <id>8110</id> <defaultcontrol>2</defaultcontrol> <allowoverlay>yes</allowoverlay> <controls> <control> <description>BackGround</description> <type>image</type> <id>1</id> <posX>0</posX> <posY>0</posY> <width>720</width> <height>576</height> <texture>background.png</texture> </control> <!-- anfang --> <control> <description>Header</description> <type>image</type> <id>1</id> <posX>0</posX> <posY>0</posY> <width>720</width> <height>70</height> <texture>AGT_PluginHeader.png</texture> </control> <!-- Ende --> <control> <description>an Image</description> <type>image</type> <id>1</id> <posX>75</posX> <posY>370</posY> <texture>hover_my videos.png</texture> </controls> </window> that why i cant understand where are the mistake |
| | |
| | #7 (permalink) |
| Portal Member Join Date: Mar 2008
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Country: | if (control == initial) { // go to the second GUI BodyMedia2 bd = new BodyMedia2(); bd.Init(); //BodyMedia2 bd = new BodyMedia2(); //bd.OnPageLoad(); // GUIWindowManager.GetWindow(8110); // GUIWindowManager.ActivateWindow(8110); //this.Visible = false; Load(GUIGraphicsContext.Skin + @"\Oberflaeche2.xml"); ClearAll(); //ClearAll(); //GUIWindowManager.CloseCurrentWindow(); GUIWindowManager.ActivateWindow(0); //GUIWindowManager.GetWindow(8110); //MessageBox.Show( GUIWindowManager.IsOsdVisible()); //GUIWindowManager.ActivateWindow(8110, true); //Load(GUIGraphicsContext.Skin + @"\Oberflaeche2.xml"); //s.Init(); // ClearAll(); } you see i use all Method : ) |
| | |
| | #8 (permalink) |
| Portal Member Join Date: Aug 2006 Location: Kentucky Age: 23
Posts: 664
Thanks: 117
Thanked 83 Times in 44 Posts
Country: | How about BodyMedia2 bd = new GUIWindowManager.GetWindow(8110); GUIWindowManager.ActivateWindow(8110) You're getting the black screen, I think, because of this call: Load(GUIGraphicsContext.Skin + @"\Oberflaeche2.xml"); Which should be handled for you when you call GetWindow (since you're already loading it from your second class). |
| | |
| | #9 (permalink) |
| Portal Member Join Date: Mar 2008
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Country: | With this Sytax BodyMedia2 bd = new GUIWindowManager.GetWindow(8110); i become a mistak Without this Syntax Load(GUIGraphicsContext.Skin + @"\Oberflaeche2.xml"); it jump to the Home window : ( |
| | |
| | #10 (permalink) | ||
| Portal Developer Join Date: May 2007
Posts: 498
Thanks: 1
Thanked 76 Times in 39 Posts
Country: | Quote:
You need a closing statement for each control statement... you are missing one at the end... The section I quoted above should be.... Code: <!-- Ende -->
<control>
<description>an Image</description>
<type>image</type>
<id>1</id>
<posX>75</posX>
<posY>370</posY>
<texture>hover_my videos.png</texture>
</control>
</controls>
</window>
Quote:
Code: Load(GUIGraphicsContext.Skin + @"\Oberflaeche2.xml");
Restore();
LoadSkin();
Regards, CybrMage Last edited by cybrmage; 2008-04-03 at 19:45. Reason: Merged double post. | ||
| | |
![]() |
| Bookmarks |
| Tags |
| activate, window |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| activate the video wallpaper ? | nissse | General Support | 18 | 2008-02-17 12:29 |
| activate ts recording? | parkuhr | MediaPortal 1 Talk | 3 | 2007-09-04 17:24 |
| how to activate VRM9 | novaman | General Support | 1 | 2006-10-09 15:38 |
| how to activate OVERLAY | novaman | General Support | 2 | 2006-09-27 15:12 |
| How do i activate a plugin? :P | Ca3 | Plugins | 2 | 2006-03-12 17:23 |