private void AddToCaptureList() { // Save the capture if there are packets in the list if (PacketManager.IsModifiedList) { CaptureRecord cr = new CaptureRecord(PacketManager.PacketList, PacketManager.Both, PacketManager.Sent, PacketManager.Received, PacketManager.Watch); _captures.Add(cr); _captureCount++; lvCaptures.Items.Add(new ListViewItem(new[] { "Capture " + _captureCount.ToString("D2") + " (" + cr.GetCaptureDateTime().ToLongTimeString() + ")", _captures.Count.ToString() })); } }
public static void LoadCapture(CaptureRecord cr) { ClearStorage(); // load capture data lock (LockingVar) { PacketList = cr.GetPacketList(); } Both = cr.GetBothList(); Sent = cr.GetSentList(); Received = cr.GetReceivedList(); Watch = cr.GetWatchList(); // Refresh view SmartRefresh(true); }