/// <summary> /// Start scanning /// </summary> private void BtScanClick(object sender, EventArgs e) { FormNewRepoScanProgress formScanProgress = new FormNewRepoScanProgress(textRoot.Text, checkBoxDeepScan.Checked); if (formScanProgress.ShowDialog() == DialogResult.OK) { // Add only unique values to the list, so we can run the scan on multiple // directories and add all scanned paths, even if they have common folders foreach (var path in formScanProgress.Gits.ToArray(). Where(path => !listRepos.Items.Contains(path))) listRepos.Items.Add(path); btSelectAll.Enabled = btSelectNone.Enabled = listRepos.Items.Count > 0; BtSelectAllClick(null, null); } }
/// <summary> /// Start scanning /// </summary> private void BtScanClick(object sender, EventArgs e) { FormNewRepoScanProgress formScanProgress = new FormNewRepoScanProgress(textRoot.Text, checkBoxDeepScan.Checked); if (formScanProgress.ShowDialog() == DialogResult.OK) { // Add only unique values to the list, so we can run the scan on multiple // directories and add all scanned paths, even if they have common folders foreach (var path in formScanProgress.Gits.ToArray(). Where(path => !listRepos.Items.Contains(path))) { listRepos.Items.Add(path); } btSelectAll.Enabled = btSelectNone.Enabled = listRepos.Items.Count > 0; BtSelectAllClick(null, null); } }