public bool OnActivity(ProgramSet prog, Program program, Priv10Engine.FwEventArgs args) { ProgramControl item = null; if (!ProgramList.Items.TryGetValue(args.guid.ToString(), out item)) { if (FirewallPage.DoFilter(CurFilter, prog)) { return(false); } item = ProgramList.AddItem(prog); args.update = false; } //Note: windows firewall doesn't block localhost acces so we ignore it //if (args.entry.State == Program.LogEntry.States.RuleError // && args.entry.FwEvent.Action == FirewallRule.Actions.Allow // && !NetFunc.IsLocalHost(args.entry.FwEvent.RemoteAddress)) // item.SetError(true); if ((chkNoLocal.IsChecked != true || (args.entry.Realm != Program.LogEntry.Realms.LocalHost && args.entry.Realm != Program.LogEntry.Realms.MultiCast)) && (chkNoLan.IsChecked != true || args.entry.Realm != Program.LogEntry.Realms.LocalArea) && args.entry.FwEvent.ProcessId != ProcFunc.CurID) // Note: When DNS proxy is nabled we are always very active, so ignore it { switch (args.entry.FwEvent.Action) { case FirewallRule.Actions.Allow: item.Flash(Colors.LightGreen); break; case FirewallRule.Actions.Block: item.Flash(Colors.LightPink); break; } } item.DoUpdate(prog); return(SortBy == Sorts.LastActivity); }