void deviceListForm_OnItemSelected(int itemIndex) { // close the device list form deviceListForm.Hide(); //bắt capture theo thứ tự divice StartCapture(itemIndex); }
void deviceListForm_OnItemSelected(int itemIndex) { // close the device list form deviceListForm.Hide(); StartCapture(itemIndex); }
void deviceListForm_OnItemSelected(int itemIndex) { // close the device list form deviceListForm.Hide(); //StartCapture(itemIndex); device = devices[itemIndex]; var interfaces = ((SharpPcap.LibPcap.PcapDevice)device).Interface; var addresses = interfaces.Addresses; foreach (var address in addresses) { if (address.Addr.ipAddress != null) { if (address.Addr.ipAddress.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork) { textBoxTargetInterfaceIpAddress.Text = address.Addr.ipAddress.ToString(); textBoxTargetInterfaceName.Text = interfaces.FriendlyName; } } } }