private void StopButton_Click(object sender, EventArgs e) { // Stop the search thread if it is running: Search.Stop(); }
private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { _closing = true; Search.Stop(); }