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 2
Plugin Development
Plugin: Shutdown Manager (or call it whatever you want ;) ) - A blog to develop a MP2 plugin
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="chefkoch" data-source="post: 942562" data-attributes="member: 10438"><p>At the beginning the <a href="https://github.com/MediaPortal/MediaPortal-2/tree/f04e684c7cc8d5653b831f61cedbe3548860672f/MediaPortal/Incubator/ShutdownManager" target="_blank">project for the plugin</a> needs to be set up in the MP2-Client.sln.</p><p> </p><p>The basic directory structure has been created using:</p><ul> <li data-xf-list-type="ul">ShutdownManager\plugin.xml: contains all required plugin definitions.</li> <li data-xf-list-type="ul">ShutdownManager\<strong>Language</strong>: contains the english language file. Translations to other languages will be done at Transifex, but won't be added to that development-folder.</li> <li data-xf-list-type="ul">ShutdownManager\<strong>Models</strong>: contains the code for the dialogs, in other words there we will define the information which are available for the skins.</li> <li data-xf-list-type="ul">ShutdownManager\<strong>Skin</strong>\<strong>default</strong>: contains the skin files for the dialogs. We only need to provide these <strong>default</strong> files and the plugin can be used immediately by all other skins, without the need to write or copy any skin files to those.</li> </ul><p>Let's start with the <a href="https://github.com/MediaPortal/MediaPortal-2/blob/f04e684c7cc8d5653b831f61cedbe3548860672f/MediaPortal/Incubator/ShutdownManager/plugin.xml" target="_blank">plugin.xml</a>.</p><p></p><p>This registers our models to MP2 so that skins can access their public properties or execute public methods, or the models could be referenced by workflow states. (follows next)</p><p> </p><p></p><p>This creates 2 workflow states as dialogs. Here the dialogs are referencing to the models, which we defined before.</p><p> </p><p>To make the dialogs accessible from the skin, I added 2 new menu entries to the home menu for the beginning, by adding a skin file <a href="https://github.com/MediaPortal/MediaPortal-2/blob/f04e684c7cc8d5653b831f61cedbe3548860672f/MediaPortal/Incubator/ShutdownManager/Skin/default/workflow/shutdown-actions.xml" target="_blank">ShutdownManager/Skin/default/workflow/shutdown-actions.xml</a>.</p><p></p><p> </p><p>More information a detailed discription of workflows, models, states etc can be found in <a href="http://wiki.team-mediaportal.com/2_MEDIAPORTAL_2/Contribute/Development/3_Concepts/Workflow" target="_blank">wiki</a>.</p><p> </p><p>The result so far is:</p><p>[ATTACH=full]116713[/ATTACH]</p></blockquote><p></p>
[QUOTE="chefkoch, post: 942562, member: 10438"] At the beginning the [URL='https://github.com/MediaPortal/MediaPortal-2/tree/f04e684c7cc8d5653b831f61cedbe3548860672f/MediaPortal/Incubator/ShutdownManager']project for the plugin[/URL] needs to be set up in the MP2-Client.sln. The basic directory structure has been created using: [LIST] [*]ShutdownManager\plugin.xml: contains all required plugin definitions. [*]ShutdownManager\[B]Language[/B]: contains the english language file. Translations to other languages will be done at Transifex, but won't be added to that development-folder. [*]ShutdownManager\[B]Models[/B]: contains the code for the dialogs, in other words there we will define the information which are available for the skins. [*]ShutdownManager\[B]Skin[/B]\[B]default[/B]: contains the skin files for the dialogs. We only need to provide these [B]default[/B] files and the plugin can be used immediately by all other skins, without the need to write or copy any skin files to those. [/LIST] Let's start with the [URL='https://github.com/MediaPortal/MediaPortal-2/blob/f04e684c7cc8d5653b831f61cedbe3548860672f/MediaPortal/Incubator/ShutdownManager/plugin.xml']plugin.xml[/URL]. This registers our models to MP2 so that skins can access their public properties or execute public methods, or the models could be referenced by workflow states. (follows next) This creates 2 workflow states as dialogs. Here the dialogs are referencing to the models, which we defined before. To make the dialogs accessible from the skin, I added 2 new menu entries to the home menu for the beginning, by adding a skin file [URL='https://github.com/MediaPortal/MediaPortal-2/blob/f04e684c7cc8d5653b831f61cedbe3548860672f/MediaPortal/Incubator/ShutdownManager/Skin/default/workflow/shutdown-actions.xml']ShutdownManager/Skin/default/workflow/shutdown-actions.xml[/URL]. More information a detailed discription of workflows, models, states etc can be found in [URL='http://wiki.team-mediaportal.com/2_MEDIAPORTAL_2/Contribute/Development/3_Concepts/Workflow']wiki[/URL]. The result so far is: [ATTACH=full]116713[/ATTACH] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Plugin Development
Plugin: Shutdown Manager (or call it whatever you want ;) ) - A blog to develop a MP2 plugin
Contact us
RSS
Top
Bottom