internal static void StopTask(WebSiteInfo webSiteInfo) { if (downloadProcess.ContainsKey(webSiteInfo)) { downloadProcess[webSiteInfo].EnableRaisingEvents = false; processPool.KillProcess(downloadProcess[webSiteInfo]); downloadProcess.Remove(webSiteInfo); } webSiteInfo.Status = StatusCode.Wait; }