// This stops checking (only called from the checking management thread) private void StopChecking() { if (this.InvokeRequired) { CallVoidMethodDeletage d = new CallVoidMethodDeletage(StopChecking); this.Invoke(d); } else { checksthread = null; progress.Value = 0; buttoncheck.Text = "Start Analysis"; Cursor.Current = Cursors.Default; running = false; blockmap.Dispose(); blockmap = null; // When no results found, show "no results" and disable the list if (results.Items.Count == 0) { results.Items.Add(new ResultNoErrors()); results.Enabled = false; } } }