private bool DeleteEntries() { bool success = true; foreach (ListViewItem item in lstResults.SelectedItems) { RegSearchMatch match = (RegSearchMatch)item.Tag; // if value is not specified if (match.Value == "-") { if (RegUtility.DeleteKey(match.Key)) { item.Remove(); } else { success = false; } } else if (RegUtility.DeleteValue(match.Key, match.Value)) { item.Remove(); } else { success = false; } } return(success); }
private bool DeleteValues() { bool success = true; foreach (ListViewItem item in lstValues.SelectedItems) { if (RegUtility.DeleteValue(item.Tag.ToString(), item.Text)) { item.Remove(); } else { success = false; } } return(success); }