private volatile bool isStop;
private System.Threading.Thread fileThread = null;
/// <summary>
/// 启动服务
/// </summary>
public void Start()
{
fileThread = new System.Threading.Thread(new System.Threading.ThreadStart(DeBind));
fileThread.Start();
}
/// <summary>
/// 中止服务
/// </summary>
public void Stop()
{
isStop = true;
if (fileThread != null && fileThread.ThreadState == System.Threading.ThreadState.Running)
fileThread.Abort();
fileThread = null;
}