예제 #1
0
        private void DeviceForm_Load(object sender, EventArgs e)
        {
            try
            {
                devices = UtilTool.searchDevice();
                if (devices == null)
                {
                    throw new Exception("No devices in this computor!");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
                return;
            }

            foreach (ICaptureDevice dev in devices)
            {
                listBox1.Items.Add(dev.Description);
                //listBox1.Items.Add(dev.Name);
                //listBox1.Items.Add(dev.MacAddress);
                //listBox1.Items.Add(dev.LinkType);
                //listBox1.Items.Add(" ");
            }

            listBox1.SelectedIndex = 0;
            form.setDevice(devices[0]);
        }
예제 #2
0
 private void loadNetAdapter()
 {
     UtilTool.searchDevice();
 }