home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
General Development (no feature request here!)
Skin dont show Reaction (newbe Question)
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Zarra" data-source="post: 254609" data-attributes="member: 70851"><p>Hello all</p><p></p><p>this is my first PlugIn and I have some question about the PlugINs and Skins , Please if someon have any Idea</p><p> i m writing a PulgIN with 2 Skins,</p><p>the second Skin GUI2 dont dont show any Reaktion if i Compile the 2 Class in the same dll Cyber.dll.</p><p>BUt if i make every class in a seperate dll then GUI2 (Skin2) Show Reaktion.</p><p></p><p>My Quetion must i for every Class.cs with his Skin to make a seperate dll?? But i dont find that Logik,</p><p>Have some on any Idea</p><p>Please help me</p><p>and Thankss</p><p></p><p>this is my Code maybe it give you Idea what i mean</p><p></p><p>[CODE]class GUI1 : GUIWindow, ISetupForm, IShowPlugin </p><p></p><p> /*public GUI1()</p><p> {</p><p> GetID = 1081;</p><p> }*/</p><p> #region ISetupForm Members</p><p></p><p></p><p> public string PluginName()</p><p> {</p><p> return "MyFirstPlugin";</p><p> }</p><p></p><p></p><p> public string Description()</p><p> {</p><p> return "My First plugin tutorial";</p><p> }</p><p></p><p> public string Author()</p><p> {</p><p> return "......";</p><p> }</p><p></p><p> // show the setup dialog</p><p> public void ShowPlugin()</p><p> {</p><p> </p><p> }</p><p></p><p></p><p> public bool CanEnable()</p><p> {</p><p> return true;</p><p> }</p><p></p><p> public override int GetID</p><p> {</p><p> get { return 1081; }</p><p> set { base.GetID = value; }</p><p> }</p><p> public int GetWindowId()</p><p> {</p><p> return 1081;</p><p> //return 5678;</p><p> }</p><p></p><p></p><p> public bool DefaultEnabled()</p><p> {</p><p> return true;</p><p> }</p><p></p><p></p><p> public bool HasSetup()</p><p> {</p><p> return true;</p><p> }</p><p></p><p></p><p> public bool ShowDefaultHome()</p><p> {</p><p> return true;</p><p> }</p><p></p><p></p><p> public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage)</p><p> {</p><p> strButtonText = PluginName();</p><p> strButtonImage = String.Empty;</p><p> strButtonImageFocus = String.Empty;</p><p> strPictureImage = String.Empty;</p><p> return true;</p><p> }</p><p></p><p> #endregion</p><p> }</p><p> public override bool Init()</p><p> {</p><p> return Load(GUIGraphicsContext.Skin + @"\Oberflaeche.xml");</p><p></p><p> }</p><p></p><p> public override int GetID</p><p> {</p><p> get { return 1081; }</p><p> set { base.GetID = value; }</p><p> }</p><p></p><p> protected override void OnClicked(int controlId, GUIControl control, MediaPortal.GUI.Library.Action.ActionType actionType)</p><p> {</p><p> if (control == initial)</p><p> {</p><p></p><p>[COLOR="black"][COLOR="Red"] Load(GUIGraphicsContext.Skin + @"\Oberflaeche2.xml");</p><p> Restore();</p><p> LoadSkin();[/COLOR][/COLOR]</p><p>}}</p><p>}</p><p> [/CODE]</p><p></p><p> </p><p>the Second Code for the Second class GUI2.cs:</p><p></p><p></p><p>[CODE] class GUI2 : GUIWindow</p><p> {</p><p></p><p> public GUI2()</p><p> {</p><p> // ID festlegen für das Plugin, diese gehört zum setup und </p><p> // ist ein einzigartiger beliebiger festgelegter Code</p><p> //GetID = 5678;</p><p></p><p> //GetID = 8110;</p><p> }</p><p></p><p> // hier der Button Aktualisieren mit der id 4</p><p> [SkinControlAttribute(400000)]</p><p> protected GUIButtonControl testen = null;</p><p></p><p> [SkinControlAttribute(2)]</p><p> protected GUIButtonControl initialisieren = null;</p><p> [SkinControlAttribute(1201)]</p><p> public GUIFacadeControl testlist = null;</p><p></p><p> #region ISetupForm Members</p><p></p><p></p><p> public string PluginName()</p><p> {</p><p> return "MyFirstPlugin";</p><p> }</p><p></p><p></p><p> public string Description()</p><p> {</p><p> return "My First plugin tutorial";</p><p> }</p><p></p><p> public string Author()</p><p> {</p><p> return "..";</p><p> }</p><p></p><p> // show the setup dialog</p><p> public Boolean ShowPlugin()</p><p> {</p><p> </p><p> MessageBox.Show("Nothing to configure, this is just an example");</p><p> return true;</p><p> }</p><p></p><p></p><p> public bool CanEnable()</p><p> {</p><p> return true;</p><p> }</p><p></p><p></p><p> public int GetWindowId()</p><p> {</p><p> return 8110;</p><p> }</p><p></p><p></p><p> public bool DefaultEnabled()</p><p> {</p><p> return true;</p><p> }</p><p></p><p></p><p> public bool HasSetup()</p><p> {</p><p> return true;</p><p> }</p><p></p><p></p><p> public override int GetID</p><p> {</p><p> get { return 8110; }</p><p> set { base.GetID = value; }</p><p> }</p><p></p><p></p><p></p><p></p><p> /* public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage)</p><p> {</p><p> strButtonText = PluginName();</p><p> strButtonImage = String.Empty;</p><p> strButtonImageFocus = String.Empty;</p><p> strPictureImage = String.Empty;</p><p> return true;</p><p> }*/</p><p></p><p> #endregion</p><p></p><p></p><p></p><p> public override bool Init()</p><p> {</p><p> return Load(GUIGraphicsContext.Skin + @"\Oberflaeche2.xml");</p><p> }</p><p></p><p> protected override void OnPageLoad()</p><p> {</p><p> MessageBox.Show("Oberflaeche2 " );</p><p> GUITextControl.SetControlLabel(8110, 33, "!!!!!!!!!!!!!11111 cm");</p><p> GUITextControl.SetControlLabel(8110, 32, " kg");</p><p> base.OnPageLoad();</p><p> }</p><p></p><p> /* protected override void OnPageDestroy(int new_windowId)</p><p> {</p><p> Load(GUIGraphicsContext.Skin + @"\Oberflaeche.xml");</p><p> Restore();</p><p> LoadSkin();</p><p> base.OnPageDestroy(new_windowId);</p><p> }*/</p><p></p><p> protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType)</p><p> {</p><p></p><p> if (control == testen)</p><p> {</p><p> MessageBox.Show("Nothing to configure, this is just an example");</p><p> // GUITextControl.SetControlLabel(1081, 31, s);</p><p> GUITextControl.SetControlLabel(8110, 33, "!!!!!!!!!!!!!11111 cm");</p><p> GUITextControl.SetControlLabel(8110, 32, " kg");</p><p></p><p> }</p><p> base.OnClicked(controlId, control, actionType);</p><p> }</p><p></p><p> public override bool OnMessage(GUIMessage message)</p><p> {</p><p> if (message.Message == GUIMessage.MessageType.GUI_MSG_ITEM_FOCUS || message.Message == GUIMessage.MessageType.GUI_MSG_ITEM_FOCUS_CHANGED)</p><p> {</p><p></p><p> }</p><p> return base.OnMessage(message);</p><p> }</p><p> }</p><p></p><p></p><p>}[/CODE]</p><p></p><p>The Skin2 (GUI2.XML2)</p><p></p><p>[HTML]<?xml version="1.0" encoding="utf-8" standalone="yes"?></p><p><window></p><p> <id>8110</id></p><p> <defaultcontrol>400000</defaultcontrol></p><p> <allowoverlay>yes</allowoverlay></p><p> <controls></p><p> <control></p><p> <description>BackGround</description></p><p> <type>image</type></p><p> <id>1</id></p><p> <posX>0</posX></p><p> <posY>0</posY></p><p> <width>720</width></p><p> <height>576</height></p><p> <texture>background.png</texture></p><p> </control></p><p></p><p> <!-- Button zum Aktualisieren der Daten--></p><p> <control></p><p> <description>Button zum Aktualisieren der Daten</description></p><p> <type>button</type></p><p> <id>400000</id></p><p> <posX>461</posX></p><p> <posY>544</posY></p><p> <width>103</width></p><p> <height>20</height></p><p> <textYOff>0</textYOff></p><p> <label>Testnennnnn</label></p><p> <font>font12</font></p><p> <onleft>5</onleft></p><p> <onright>6</onright></p><p> <onup>3</onup></p><p> <ondown>7</ondown></p><p> </control></p><p></p><p> <!-- Button zum Hauptmenü--></p><p> <control></p><p> <description>Hauptmenü</description></p><p> <type>button</type></p><p> <id>6</id></p><p> <posX>590</posX></p><p> <posY>544</posY></p><p> <width>125</width></p><p> <height>20</height></p><p> <font>font12</font></p><p> <textYOff>0</textYOff></p><p> <label>zum Hauptmenu</label></p><p> <font>font12</font></p><p> <onleft>4</onleft></p><p> <onright>2</onright></p><p> <onup>8</onup></p><p> <ondown>7</ondown></p><p> </control></p><p></p><p> </controls></p><p></window>[/HTML]</p></blockquote><p></p>
[QUOTE="Zarra, post: 254609, member: 70851"] Hello all this is my first PlugIn and I have some question about the PlugINs and Skins , Please if someon have any Idea 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 this 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; //return 5678; } 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; } #endregion } public override bool Init() { return Load(GUIGraphicsContext.Skin + @"\Oberflaeche.xml"); } public override int GetID { get { return 1081; } set { base.GetID = value; } } protected override void OnClicked(int controlId, GUIControl control, MediaPortal.GUI.Library.Action.ActionType actionType) { if (control == initial) { [COLOR="black"][COLOR="Red"] Load(GUIGraphicsContext.Skin + @"\Oberflaeche2.xml"); Restore(); LoadSkin();[/COLOR][/COLOR] }} } [/CODE] the Second Code for the Second class GUI2.cs: [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 Boolean ShowPlugin() { MessageBox.Show("Nothing to configure, this is just an example"); return true; } 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(1081, 31, s); GUITextControl.SetControlLabel(8110, 33, "!!!!!!!!!!!!!11111 cm"); GUITextControl.SetControlLabel(8110, 32, " kg"); } 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); } } }[/CODE] The Skin2 (GUI2.XML2) [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 Hauptmenü--> <control> <description>Hauptmenü</description> <type>button</type> <id>6</id> <posX>590</posX> <posY>544</posY> <width>125</width> <height>20</height> <font>font12</font> <textYOff>0</textYOff> <label>zum Hauptmenu</label> <font>font12</font> <onleft>4</onleft> <onright>2</onright> <onup>8</onup> <ondown>7</ondown> </control> </controls> </window>[/HTML] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
Skin dont show Reaction (newbe Question)
Contact us
RSS
Top
Bottom