protected override void Dispose(bool disposing)
{
if (disposing)
{
if (_listener != null)
_listener.Dispose();
if (_trayIcon != null)
_trayIcon.Dispose();
try
{
if (_mutex != null)
_mutex.ReleaseMutex();
} catch (ApplicationException)
{
// Do nothing since the exception is due to attempting to release
// a mutex that we do not own
}
}
base.Dispose(disposing);
}