| |||||||
| Newcomers Forum The newcomers forum is for members who may be: new to forums; intimidated by our size; or just learning about some of the many topics being discussed on the MediaPortal Forum. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| Portal Member Join Date: Mar 2008
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Country: | Hello all I have some question about the PlugINs and Skins , i m writing a PulgIN with 2 Skins, the second Skin GUI2 dont dont show any Reaktion if i Compile the 2 Class in the same dll Cyber.dll. BUt if i make every class in a seperate dll then GUI2 (Skin2) Show Reaktion. My Quetion must i for every Class.cs with his Skin to make a seperate dll?? But i dont find that Logik, Have some on any Idea Please help me and Thankss Hier is my Code maybe it give you Idea what i mean Code: class GUI1 : GUIWindow, ISetupForm, IShowPlugin
{
/*public GUI1()
{
GetID = 1081;
}*/
#region ISetupForm Members
public string PluginName()
{
return "MyFirstPlugin";
}
public string Description()
{
return "My First plugin tutorial";
}
public string Author()
{
return "....";
}
// show the setup dialog
public void ShowPlugin()
{
}
public bool CanEnable()
{
return true;
}
public override int GetID
{
get { return 1081; }
set { base.GetID = value; }
}
public int GetWindowId()
{
return 1081;
}
public bool DefaultEnabled()
{
return true;
}
public bool HasSetup()
{
return true;
}
public bool ShowDefaultHome()
{
return true;
}
public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage)
{
strButtonText = PluginName();
strButtonImage = String.Empty;
strButtonImageFocus = String.Empty;
strPictureImage = String.Empty;
return true;
}
public override bool Init()
{
return Load(GUIGraphicsContext.Skin + @"\Oberflaeche.xml");
}
protected override void OnClicked(int controlId, GUIControl control, MediaPortal.GUI.Library.Action.ActionType actionType)
{
Load(GUIGraphicsContext.Skin + @"\Oberflaeche2.xml");
Restore();
LoadSkin();
}
}
Code: class GUI2 : GUIWindow
{
public GUI2()
{
// ID festlegen für das Plugin, diese gehört zum setup und
// ist ein einzigartiger beliebiger festgelegter Code
//GetID = 5678;
//GetID = 8110;
}
// hier der Button Aktualisieren mit der id 4
[SkinControlAttribute(400000)]
protected GUIButtonControl testen = null;
[SkinControlAttribute(2)]
protected GUIButtonControl initialisieren = null;
[SkinControlAttribute(1201)]
public GUIFacadeControl testlist = null;
#region ISetupForm Members
public string PluginName()
{
return "MyFirstPlugin";
}
public string Description()
{
return "My First plugin tutorial";
}
public string Author()
{
return "......";
}
// show the setup dialog
public void ShowPlugin()
{
MessageBox.Show("Nothing to configure, this is just an example");
}
public bool CanEnable()
{
return true;
}
public int GetWindowId()
{
return 8110;
}
public bool DefaultEnabled()
{
return true;
}
public bool HasSetup()
{
return true;
}
public override int GetID
{
get { return 8110; }
set { base.GetID = value; }
}
/* public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage)
{
strButtonText = PluginName();
strButtonImage = String.Empty;
strButtonImageFocus = String.Empty;
strPictureImage = String.Empty;
return true;
}*/
#endregion
public override bool Init()
{
return Load(GUIGraphicsContext.Skin + @"\Oberflaeche2.xml");
}
protected override void OnPageLoad()
{
MessageBox.Show("Oberflaeche2 " );
GUITextControl.SetControlLabel(8110, 33, "!!!!!!!!!!!!!11111 cm");
GUITextControl.SetControlLabel(8110, 32, " kg");
base.OnPageLoad();
}
/* protected override void OnPageDestroy(int new_windowId)
{
Load(GUIGraphicsContext.Skin + @"\Oberflaeche.xml");
Restore();
LoadSkin();
base.OnPageDestroy(new_windowId);
}*/
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType)
{
if (control == testen)
{
MessageBox.Show("Nothing to configure, this is just an example");
GUITextControl.SetControlLabel(8110, 33, "!!!!!!!!!!!!!11111 cm");
GUITextControl.SetControlLabel(8110, 32, " kg");
}
base.OnClicked(controlId, control, actionType);
}
}
HTML Code: <?xml version="1.0" encoding="utf-8" standalone="yes"?> <window> <id>8110</id> <defaultcontrol>400000</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> ..... <!-- Button zum Aktualisieren der Daten--> <control> <description>Button zum Aktualisieren der Daten</description> <type>button</type> <id>400000</id> <posX>461</posX> <posY>544</posY> <width>103</width> <height>20</height> <textYOff>0</textYOff> <label>Testnennnnn</label> <font>font12</font> <onleft>5</onleft> <onright>6</onright> <onup>3</onup> <ondown>7</ondown> </control> <!-- Button zum initialisieren der neuen Daten--> <control> <description>Button für die Initialisierung</description> <type>button</type> <id>2</id> <posX>300</posX> <posY>543</posY> <width>138</width> <height>20</height> <textYOff>0</textYOff> <label>Daten initialisieren</label> <font>font12</font> <onleft>3</onleft> <onright>4</onright> <onup>8</onup> <ondown>7</ondown> </control> </controls> </window> |
| | |
![]() |
| Bookmarks |
| Tags |
| skin |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| skin dont show any reaction | Zarra | Plugins | 0 | 2008-04-04 12:25 |
| Subwoofer dont work when AC3 | chrissooo | General Support | 1 | 2007-09-08 12:08 |
| EPG import dont work. | Juppe | pre 1.0 RC1 | 10 | 2007-05-31 21:36 |
| hauppauge remote dont work? | zewe | General Support | 2 | 2006-10-18 22:24 |