private bool WFNRulesPredicate(FirewallHelper.Rule r) { return(r.Name.StartsWith(rulePrefix, StringComparison.Ordinal) || r.Name.StartsWith(oldRulePrefix, StringComparison.Ordinal) || r.Name.StartsWith(rulePrefixAlt2, StringComparison.Ordinal) || r.Name.StartsWith(tempRulePrefix, StringComparison.Ordinal)); }
private void btnRemoveRule_Click(object sender, RoutedEventArgs e) { if (MessageBox.Show(Common.Properties.Resources.MSG_RULE_DELETE, Common.Properties.Resources.MSG_DLG_TITLE, MessageBoxButton.YesNo, MessageBoxImage.Question) == MessageBoxResult.Yes) { FirewallHelper.Rule selectedRule = (FirewallHelper.Rule)gridRules.SelectedItem; if (!FirewallHelper.RemoveRule(selectedRule.Name)) { MessageBox.Show(Common.Properties.Resources.MSG_RULE_DELETE_FAILED, Common.Properties.Resources.MSG_DLG_ERR_TITLE, MessageBoxButton.OK, MessageBoxImage.Error); return; } allRules.Remove(selectedRule); filterRules(); } }
private bool filteredRulesPredicate(FirewallHelper.Rule r) { return(r.Name.IndexOf(txtFilter.Text, StringComparison.OrdinalIgnoreCase) > -1 || (r.ApplicationName != null && r.ApplicationName.IndexOf(txtFilter.Text, StringComparison.CurrentCultureIgnoreCase) > -1)); }
private bool activeRulesPredicate(FirewallHelper.Rule r) { return(r.Enabled); }
private bool WSHRulesPredicate(FirewallHelper.Rule r) { return(r.Name.StartsWith(Common.Properties.Resources.RULE_WSH_PREFIX, StringComparison.Ordinal)); }
private bool WSHRulesPredicate(FirewallHelper.Rule r) { return(r.Name.StartsWith("WSH -")); }
private bool WFNRulesPredicate(FirewallHelper.Rule r) { return(r.Name.StartsWith(rulePrefix) || r.Name.StartsWith("[WFN ") || r.Name.EndsWith(tempRuleSuffix)); }
private bool WFNRulesPredicate(FirewallHelper.Rule r) { return(r.Name.StartsWith(rulePrefix)); }