Example #1
0
        private void ClearPacketListExecute()
        {
            PacketList.Clear();
            FilteredPacketList.Clear();
            StatsHandler.ResetStats();

            if (monitor != null)
            {
                StatsHandler.StopWatch.Start();
            }

            ClearSelectedPacketData();
            IsClearEnabled = false;
        }
Example #2
0
        /// <summary>
        /// Adds newly received packet to packet lists
        /// </summary>
        /// <param name="newPacket">Packet to be added to packet lists</param>
        private void ReceiveNewPacket(IPPacket newPacket)
        {
            newPacket.PacketID = (uint)PacketList.Count + 1;

            lock (PacketList)
            {
                PacketList.Add(newPacket);
            }
            IsClearEnabled = true;

            lock (filteredPacketList)
            {
                AddToFilteredList(newPacket);
            }

            StatsHandler.UpdateStats(newPacket);
        }