/// <summary> /// Constructor from an event object /// </summary> /// <param name="args">The event args</param> public LogPacket(LogPacketEventArgs args) : this(args.Tag, args.NetId, Guid.NewGuid(), args.NetworkDescription, args.Frame, args.Color, args.Timestamp) { }
private void log_AddLogPacket(object sender, LogPacketEventArgs e) { LogPacket packet = new LogPacket(e); if (FilterLogPacketEvent != null) { FilterPacketLogEventArgs args = new FilterPacketLogEventArgs(packet, sender as NetGraph); FilterLogPacketEvent.Invoke(this, args); if (args.Filter) { packet = null; } else { packet = args.Packet; } } if (packet != null) { lock (_packetLog) { _packetLog.Add(packet); } } }
void log_AddLogPacket(object sender, LogPacketEventArgs e) { logPacketControlOutput.AddLogEntry(new LogPacket(e)); }