public static void Uninitialize()
{
try
{
if (_thread != null)
{
_stopThread = true;
for (int i = 0; i < 10; i++)
{
if (_thread.ThreadState == System.Threading.ThreadState.Stopped)
break;
System.Threading.Thread.Sleep(50);
Application.DoEvents();
}
if (_thread.ThreadState != System.Threading.ThreadState.Stopped)
_thread.Abort();
_thread = null;
}
}
catch (Exception ex)
{
BNS_ACT_Plugin.LogParserMessage("Error [BNS_Log.Uninitialize] " + ex.ToString().Replace(Environment.NewLine, " "));
}
}