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
the Second Code:
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)
{
[COLOR="Red"]Load(GUIGraphicsContext.Skin + @"\Oberflaeche2.xml");
Restore();
LoadSkin();[/COLOR]
}
}
the Second Code:
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:
<?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>
Germany