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
New to MP pluggin development
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="LudoJ" data-source="post: 157261" data-attributes="member: 24258"><p>Hi guys, I'm new to plugin development.</p><p></p><p>I'm trying to write a little process plugin. I've followed the "How to write a plugin for MP" tutorial.</p><p></p><p>For the moment, my goal is very simple, I just want to display a pop-up when MP starts.</p><p></p><p>Here is hat I've done for now:</p><p>[CODE]</p><p>using System;</p><p>using System.Windows.Forms;</p><p>using MediaPortal.GUI.Library;</p><p>using MediaPortal.Dialogs;</p><p></p><p>namespace WhosCalling</p><p>{</p><p> public class Class1 : GUIWindow, ISetupForm</p><p> {</p><p> public Class1()</p><p> {</p><p> //</p><p> // TODO: Add constructor logic here</p><p> //</p><p> }</p><p></p><p> #region IPlugin Members</p><p> public void Start()</p><p> {</p><p> GUIDialogOK dlg = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK);</p><p> dlg.SetHeading("Hello World");</p><p> dlg.SetLine(1, String.Empty);</p><p> dlg.SetLine(2, String.Empty);</p><p> dlg.SetLine(3, String.Empty);</p><p> dlg.DoModal(GUIWindowManager.ActiveWindow);</p><p> }</p><p></p><p> public void Stop()</p><p> {</p><p></p><p> }</p><p></p><p> #endregion</p><p></p><p></p><p> #region ISetupForm Members</p><p> // Returns the name of the plugin which is shown in the plugin menu</p><p> public string PluginName()</p><p> {</p><p> return "MyFirstPlugin";</p><p> }</p><p></p><p></p><p></p><p> [...]</p><p></p><p></p><p> #endregion</p><p> }</p><p>}[/CODE]</p><p></p><p>As you can see, this is very simple...</p><p></p><p>I can see it and enable it under the configurator, but my pop-up does not show at MP's startup... What am I doing wrong?</p><p></p><p></p><p></p><p>At the same time if any one could tell me how to do a thread or a timer, that would be good <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p></p><p></p><p>Ludo...</p></blockquote><p></p>
[QUOTE="LudoJ, post: 157261, member: 24258"] Hi guys, I'm new to plugin development. I'm trying to write a little process plugin. I've followed the "How to write a plugin for MP" tutorial. For the moment, my goal is very simple, I just want to display a pop-up when MP starts. Here is hat I've done for now: [CODE] using System; using System.Windows.Forms; using MediaPortal.GUI.Library; using MediaPortal.Dialogs; namespace WhosCalling { public class Class1 : GUIWindow, ISetupForm { public Class1() { // // TODO: Add constructor logic here // } #region IPlugin Members public void Start() { GUIDialogOK dlg = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK); dlg.SetHeading("Hello World"); dlg.SetLine(1, String.Empty); dlg.SetLine(2, String.Empty); dlg.SetLine(3, String.Empty); dlg.DoModal(GUIWindowManager.ActiveWindow); } public void Stop() { } #endregion #region ISetupForm Members // Returns the name of the plugin which is shown in the plugin menu public string PluginName() { return "MyFirstPlugin"; } [...] #endregion } }[/CODE] As you can see, this is very simple... I can see it and enable it under the configurator, but my pop-up does not show at MP's startup... What am I doing wrong? At the same time if any one could tell me how to do a thread or a timer, that would be good :-) Ludo... [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
New to MP pluggin development
Contact us
RSS
Top
Bottom