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
MediaPortal 1 Plugins
Popular Plugins
Graveyard
InfoService
*ORIGINAL THREAD* InfoService v1.6 - Feed reader/Twitter reader and weather
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="DieBagger" data-source="post: 531594" data-attributes="member: 56421"><p>How about GUI messages?</p><p></p><p>You could define a standard set of options that a plugin has to use and maybe provide a sourcefile that implements sending of messages.</p><p></p><p>Something like this:</p><p>[CODE]</p><p> GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_NOTIFY, INFO_SERVICE_ID, this.GetID,</p><p> ParentID, newItemId, someInt, </p><p> new string[] { "Name of Item", "Description of item", "Path to image" });</p><p> message = new GUIMessage(GUIMessage.MessageType.GUI_MSG_CLICKED, WindowId, GetID, ParentID, 0, 0, null);</p><p> GUIGraphicsContext.SendMessage(message);</p><p>[/CODE]</p><p></p><p>Your plugin would just have to listen for messages with the given id:</p><p></p><p>[CODE] </p><p> public override bool OnMessage(GUIMessage message)</p><p> {</p><p> if (message.Message == GUIMessage.MessageType.GUI_MSG_NOTIFY)</p><p> {//add item to recently added list</p><p> </p><p> }</p><p> return base.OnMessage(message);</p><p> }</p><p>[/CODE]</p><p></p><p>I have no idea if this could work or if it would produce any sideeffects (it would probably be better to choose a different id <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite2" alt=";)" title="Wink ;)" loading="lazy" data-shortname=";)" />) but it would minimize the effort for plugins (no dlls to include).</p></blockquote><p></p>
[QUOTE="DieBagger, post: 531594, member: 56421"] How about GUI messages? You could define a standard set of options that a plugin has to use and maybe provide a sourcefile that implements sending of messages. Something like this: [CODE] GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_NOTIFY, INFO_SERVICE_ID, this.GetID, ParentID, newItemId, someInt, new string[] { "Name of Item", "Description of item", "Path to image" }); message = new GUIMessage(GUIMessage.MessageType.GUI_MSG_CLICKED, WindowId, GetID, ParentID, 0, 0, null); GUIGraphicsContext.SendMessage(message); [/CODE] Your plugin would just have to listen for messages with the given id: [CODE] public override bool OnMessage(GUIMessage message) { if (message.Message == GUIMessage.MessageType.GUI_MSG_NOTIFY) {//add item to recently added list } return base.OnMessage(message); } [/CODE] I have no idea if this could work or if it would produce any sideeffects (it would probably be better to choose a different id ;)) but it would minimize the effort for plugins (no dlls to include). [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
Graveyard
InfoService
*ORIGINAL THREAD* InfoService v1.6 - Feed reader/Twitter reader and weather
Contact us
RSS
Top
Bottom