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 void DeleteTreeKey() { if (UIUtility.ConfirmAction(this, Properties.Resources.Confirm_DeleteKey, "Key Delete", true)) { if (RegUtility.DeleteKey(tvwKeys.SelectedNode.Tag.ToString())) { tvwKeys.SelectedNode.Remove(); } else { UIUtility.WarnUser(this, Properties.Resources.Error_DeleteKeyFail); } } }