Esempio n. 1
0
        private static LibPcapLiveDevice getDeviceFromIndex(int selectedIndex)
        {
            var devices        = ArpScanner.getDeviceList();
            var selectedDevice = devices[selectedIndex];

            return(selectedDevice);
        }
Esempio n. 2
0
        public Form2()
        {
            InitializeComponent();

            foreach (var device in ArpScanner.getDeviceList())
            {
                //Console.WriteLine(device.Description);
                comboBox1.Items.Add(device.Description);
            }

            comboBox1.SelectedIndex         = ArpScanner.deviceIndex;
            comboBox1.SelectedIndexChanged += ComboBox1_SelectedIndexChanged;

            var selectedDevice = getDeviceFromIndex(ArpScanner.deviceIndex);

            populateDeviceIPAddrs(selectedDevice);
        }