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: 942561" data-attributes="member: 10438"><p>Hi,</p><p> </p><p>I am missing an essential feature in MP2: I want to choose different power actions from a menu to shutdown the pc, supend or restart it. Close and Minimize MP2 etc.</p><p> </p><p>I already wrote down some ideas and specification in wiki: <a href="http://wiki.team-mediaportal.com/index.php?title=2_MEDIAPORTAL_2/Contribute/Development/Tasks_%26_Todos/Shutdown_menu" target="_blank">http://wiki.team-mediaportal.com/index.php?title=2_MEDIAPORTAL_2/Contribute/Development/Tasks_&_Todos/Shutdown_menu</a></p><p> </p><p>The branch which will be used for the development can be found on GIT: <a href="https://github.com/MediaPortal/MediaPortal-2/tree/FEAT_ShutdownManager" target="_blank">https://github.com/MediaPortal/MediaPortal-2/tree/FEAT_ShutdownManager</a></p><p> </p><p>After some time now, I decided to try to develop it on my own. There are a few different things which needs to be implemented:</p><ol> <li data-xf-list-type="ol">The name of the plugin <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite2" alt=";)" title="Wink ;)" loading="lazy" data-shortname=";)" /> Does not matter at this stage, and will be re-defined during the code review after everything else is done.</li> <li data-xf-list-type="ol">The GUI dialog for showing the user the shutdown / power actions which will be executed immediately.</li> <li data-xf-list-type="ol">The GUI dialog for showing the user the shutdown / power actions which will be executed delayed. (Sleeptimer feature)</li> <li data-xf-list-type="ol">A settings UI to:<br /> - reorder items of dialog (2.) containing the immediate executed actions<br /> - hide/show item of dialog (2.) containing the immediate executed actions</li> <li data-xf-list-type="ol">The implementation to actually perform the power actions.</li> <li data-xf-list-type="ol">Make the dialogs or the power actions available in GUI and via keybindings.</li> </ol><p>I will post more ideas, progress updates, problems and their fixes within this thread.</p><p> </p><p>Please remember that these are the steps I worked myself into the topic. It is not best practice. If there are things which I improve later I try to link to the better practice from the worse one.</p><p> </p><p>Table of Contents:</p><ul> <li data-xf-list-type="ul"><a href="https://forum.team-mediaportal.com/threads/plugin-shutdown-manager-or-call-it-whatever-you-want-a-blog-to-develop-a-mp2-plugin.114523/#post-942562" target="_blank">Creating the directory structure and plugin.xml file</a></li> <li data-xf-list-type="ul"><a href="https://forum.team-mediaportal.com/threads/plugin-shutdown-manager-or-call-it-whatever-you-want-a-blog-to-develop-a-mp2-plugin.114523/#post-942563" target="_blank">Creating the first skin files for the dialogs (screens)</a></li> <li data-xf-list-type="ul"><a href="https://forum.team-mediaportal.com/threads/plugin-shutdown-manager-or-call-it-whatever-you-want-a-blog-to-develop-a-mp2-plugin.114523/#post-942564" target="_blank">Use a class Consts.cs to re-use localization resource identifiers, workflow states and additional keys for GUI usage</a></li> <li data-xf-list-type="ul"><a href="https://forum.team-mediaportal.com/threads/plugin-shutdown-manager-or-call-it-whatever-you-want-a-blog-to-develop-a-mp2-plugin.114523/#post-942565" target="_blank">Settings vs. Configurations in MP2 & Creating a GUI for a CustomConfigSetting</a></li> <li data-xf-list-type="ul">Filling a ListView / ItemList with own data types (classes)</li> <li data-xf-list-type="ul">Improve the integration of the shutdown dialogs in MP2 GUI</li> <li data-xf-list-type="ul">Add the actual implementation to put all the buttons / controls into use</li> <li data-xf-list-type="ul">Code reviews and improvements</li> </ul><p>[spoiler]</p><ul> <li data-xf-list-type="ul">Conclusions & ToDo tasks in general (independent from this plugin/implementation):</li> <li data-xf-list-type="ul">Documentation of the default available styles/ controls....</li> <li data-xf-list-type="ul">Documentation of the available Commands/ properties?</li> <li data-xf-list-type="ul">Where does DataContext apply??? i.e.<br /> <ControlTemplate x:Key="Contents_Template" DataContext="{Binding Source={StaticResource Model}}"><br /> on ControlTemplate does not work, but<br /> <StackPanel DataContext="{Binding Source={StaticResource Model}}"><br /> on StackPanel does.</li> <li data-xf-list-type="ul">How to build and use ItemLists? Which data type are the items of? derived from ListItem? ...</li> <li data-xf-list-type="ul">What is ListItem AdditionalProperties for?</li> <li data-xf-list-type="ul">How to find defintions of styles? where to look for, i.e. EditPlaylistListViewStyle</li> </ul><p>[/spoiler]</p></blockquote><p></p>
[QUOTE="chefkoch, post: 942561, member: 10438"] Hi, I am missing an essential feature in MP2: I want to choose different power actions from a menu to shutdown the pc, supend or restart it. Close and Minimize MP2 etc. I already wrote down some ideas and specification in wiki: [URL='http://wiki.team-mediaportal.com/index.php?title=2_MEDIAPORTAL_2/Contribute/Development/Tasks_%26_Todos/Shutdown_menu']http://wiki.team-mediaportal.com/index.php?title=2_MEDIAPORTAL_2/Contribute/Development/Tasks_&_Todos/Shutdown_menu[/URL] The branch which will be used for the development can be found on GIT: [url]https://github.com/MediaPortal/MediaPortal-2/tree/FEAT_ShutdownManager[/url] After some time now, I decided to try to develop it on my own. There are a few different things which needs to be implemented: [LIST=1] [*]The name of the plugin ;) Does not matter at this stage, and will be re-defined during the code review after everything else is done. [*]The GUI dialog for showing the user the shutdown / power actions which will be executed immediately. [*]The GUI dialog for showing the user the shutdown / power actions which will be executed delayed. (Sleeptimer feature) [*]A settings UI to: - reorder items of dialog (2.) containing the immediate executed actions - hide/show item of dialog (2.) containing the immediate executed actions [*]The implementation to actually perform the power actions. [*]Make the dialogs or the power actions available in GUI and via keybindings. [/LIST] I will post more ideas, progress updates, problems and their fixes within this thread. Please remember that these are the steps I worked myself into the topic. It is not best practice. If there are things which I improve later I try to link to the better practice from the worse one. Table of Contents: [LIST] [*][URL='https://forum.team-mediaportal.com/threads/plugin-shutdown-manager-or-call-it-whatever-you-want-a-blog-to-develop-a-mp2-plugin.114523/#post-942562']Creating the directory structure and plugin.xml file[/URL] [*][URL='https://forum.team-mediaportal.com/threads/plugin-shutdown-manager-or-call-it-whatever-you-want-a-blog-to-develop-a-mp2-plugin.114523/#post-942563']Creating the first skin files for the dialogs (screens)[/URL] [*][URL='https://forum.team-mediaportal.com/threads/plugin-shutdown-manager-or-call-it-whatever-you-want-a-blog-to-develop-a-mp2-plugin.114523/#post-942564']Use a class Consts.cs to re-use localization resource identifiers, workflow states and additional keys for GUI usage[/URL] [*][URL='https://forum.team-mediaportal.com/threads/plugin-shutdown-manager-or-call-it-whatever-you-want-a-blog-to-develop-a-mp2-plugin.114523/#post-942565']Settings vs. Configurations in MP2 & Creating a GUI for a CustomConfigSetting[/URL] [*]Filling a ListView / ItemList with own data types (classes) [*]Improve the integration of the shutdown dialogs in MP2 GUI [*]Add the actual implementation to put all the buttons / controls into use [*]Code reviews and improvements [/LIST] [spoiler] [LIST] [*]Conclusions & ToDo tasks in general (independent from this plugin/implementation): [*]Documentation of the default available styles/ controls.... [*]Documentation of the available Commands/ properties? [*]Where does DataContext apply??? i.e. <ControlTemplate x:Key="Contents_Template" DataContext="{Binding Source={StaticResource Model}}"> on ControlTemplate does not work, but <StackPanel DataContext="{Binding Source={StaticResource Model}}"> on StackPanel does. [*]How to build and use ItemLists? Which data type are the items of? derived from ListItem? ... [*]What is ListItem AdditionalProperties for? [*]How to find defintions of styles? where to look for, i.e. EditPlaylistListViewStyle [/LIST] [/spoiler] [/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