public void Add(Program prog, Program.LogEntry entry) { ProgramList.ID id = entry.mID; Tuple <Program, List <Program.LogEntry> > list; if (!mEvents.TryGetValue(id, out list)) { list = new Tuple <Program, List <Program.LogEntry> >(prog, new List <Program.LogEntry>()); mEvents.Add(id, list); mEventList.Add(id); } list.Item2.Add(entry); if (curIndex >= mEventList.Count) { curIndex = mEventList.Count - 1; } UpdateIndex(); int index = mEventList.FindIndex((x) => { return(id.CompareTo(x) == 0); }); if (curIndex == index) { LoadCurrent(); } }
internal void Update(Program.LogEntry new_args) { if (entry.Update(new_args)) { NotifyPropertyChanged("DestAddress"); } // The rest can't change }
public void NotifyActivity(Guid guid, Program.LogEntry entry) { Application.Current.Dispatcher.BeginInvoke(new Action(() => { ActivityNotification?.Invoke(this, new Firewall.NotifyArgs() { guid = guid, entry = entry }); })); }
public LogItem(Program.LogEntry entry, string name) { this.entry = entry; this.name = name != null ? name : "[unknown progream]"; this.IsLocal = NetFunc.IsLocalHost(entry.FwEvent.RemoteAddress); this.IsMulti = NetFunc.IsMultiCast(entry.FwEvent.RemoteAddress); this.IsLan = FirewallRule.MatchAddress(entry.FwEvent.RemoteAddress, FirewallRule.AddrKeywordLocalSubnet); }
public void Add(Program prog, Program.LogEntry entry) { ProgramList.ID id = entry.mID; Tuple <Program, List <Program.LogEntry> > list; if (!mEvents.TryGetValue(id, out list)) { list = new Tuple <Program, List <Program.LogEntry> >(prog, new List <Program.LogEntry>()); mEvents.Add(id, list); mEventList.Add(id); } list.Item2.Add(entry); int oldIndex = curIndex; if (curIndex < 0) { curIndex = 0; } else if (curIndex >= mEventList.Count) { curIndex = mEventList.Count - 1; } UpdateIndex(); // don't update if the event is for a different entry int index = mEventList.FindIndex((x) => { return(id.CompareTo(x) == 0); }); if (curIndex != index) { return; } LoadCurrent(oldIndex == curIndex); }
public ConEntry(Program.LogEntry entry) { Entry = entry; }
public void NotifyActivity(Guid guid, Program.LogEntry entry) { SendPushNotification("ActivityNotification", new object[] { guid, entry }); }
public LogItem(Program.LogEntry entry, string name) { this.entry = entry; this.name = name != null ? name : "[unknown progream]"; }