- July 12, 2008
- 1
- 0
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
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