MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal 1 » Help on Development » General Development (no feature request here!)


General Development (no feature request here!) You were able to fix an issue, or improved a feature? Post it here.

Reply
 
LinkBack Thread Tools Display Modes
Old 2008-04-12, 17:39   #1 (permalink)
Portal Member
 
Join Date: Mar 2008
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts

Country:


Default Skin dont show Reaction (newbe Question)

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)
               {

                      Load(GUIGraphicsContext.Skin + @"\Oberflaeche2.xml");
                       Restore();
                       LoadSkin();
}}
}

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);
        }
    }


}
The Skin2 (GUI2.XML2)

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 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> 
Zarra is offline   Reply With Quote
Old 2008-04-13, 10:42   #2 (permalink)
Portal Member
 
Join Date: Mar 2008
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts

Country:


Default

can't go on developing :/, please help
Zarra is offline   Reply With Quote
Reply

Bookmarks

Tags
newbe, question, reaction, show, skin

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Skin dont work Zarra Newcomers Forum 1 2008-04-13 10:44
skin dont show any reaction Zarra Plugins 0 2008-04-04 12:25
artist view - dont show if less than x songs deebo Improvement Suggestions 9 2008-02-02 16:56
Channel Group Order in MiniEGP wrong + dont show any channels in "All Channels" chrissooo General Support 8 2007-07-05 16:45
last SVN dont show HD-Channels Flocke pre 1.0 RC1 15 2007-03-18 20:20


All times are GMT +1. The time now is 07:56.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress