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
Stop Process Plugin on Exit
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="underworlduk" data-source="post: 282892" data-attributes="member: 79207"><p>I am having a problem with a non-gui process plugin that implements IPlugin. On startup the code in the Start() method is run, but when media portal is closed the code in the Stop() method is not run. This is causing the media portal process to remain running in the background with the gui closed.</p><p></p><p>Am I doing something wrong or is there another way to execute the code that must run before the application exits?</p><p></p><p> /// <summary></p><p> /// This method will be called by mediaportal to start our process plugin</p><p> /// </summary></p><p> public void Start()</p><p> {</p><p> System.Windows.Forms.MessageBox.Show("Starting");</p><p> player = new Player();</p><p> server = new TcpServer.Server (801);</p><p> server.DataRecieved += new TcpServer.Server.DataRecievedEventHandler(DataRecieved);</p><p> }</p><p></p><p></p><p> /// <summary></p><p> /// This method will be called by mediaportal to stop the process plugin</p><p> /// </summary></p><p> public void Stop()</p><p> {</p><p> System.Windows.Forms.MessageBox.Show("Closing");</p><p> server.StopServer();</p><p> player = null;</p><p> server = null;</p><p> Application.Exit();</p><p> }</p><p></p><p></p><p>Thanks,</p><p>Lee</p></blockquote><p></p>
[QUOTE="underworlduk, post: 282892, member: 79207"] I am having a problem with a non-gui process plugin that implements IPlugin. On startup the code in the Start() method is run, but when media portal is closed the code in the Stop() method is not run. This is causing the media portal process to remain running in the background with the gui closed. Am I doing something wrong or is there another way to execute the code that must run before the application exits? /// <summary> /// This method will be called by mediaportal to start our process plugin /// </summary> public void Start() { System.Windows.Forms.MessageBox.Show("Starting"); player = new Player(); server = new TcpServer.Server (801); server.DataRecieved += new TcpServer.Server.DataRecievedEventHandler(DataRecieved); } /// <summary> /// This method will be called by mediaportal to stop the process plugin /// </summary> public void Stop() { System.Windows.Forms.MessageBox.Show("Closing"); server.StopServer(); player = null; server = null; Application.Exit(); } Thanks, Lee [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Stop Process Plugin on Exit
Contact us
RSS
Top
Bottom