Пример #1
0
 // This method is invoked whenever a packet recieved from network interface()
 public void OnPacketArrival(SharpPcap.CaptureEventArgs e)
 {
     try
     {
         // Generate a new DataGridViewRow
         NetParser.GenerateDataGridViewRow(e);
     }
     catch
     {
         // Do nothing.
     }
 }
Пример #2
0
 private void dgvPackets_RowEnter(object sender, DataGridViewCellEventArgs e)
 {
     if (dgvPackets.Rows[e.RowIndex].Tag != null)
     {
         PacketDotNet.InternetLinkLayerPacket internetLinkLayerPacket =
             (PacketDotNet.InternetLinkLayerPacket)dgvPackets.Rows[e.RowIndex].Tag;
         try
         {
             NetParser.GenerateTreeViewNode(internetLinkLayerPacket, _defaultNodesState);
         }
         catch
         {
         }
     }
 }