private void button2_Click(object sender, System.EventArgs e) { for (int i = 0; i < directorySearcher.Count; i++) { directorySearcher.SetItemChecked(i, true); } }