Beispiel #1
0
        /// <summary>
        /// Refresh the device list
        /// </summary>
        public void Refresh()
        {
            lock (this)
            {
                // clear out any items we might have
                base.Items.Clear();

                // windows
                if ((Environment.OSVersion.Platform == PlatformID.Win32NT) ||
                    (Environment.OSVersion.Platform == PlatformID.Win32Windows))
                {
                    nPcapDeviceList.Refresh();

                    foreach (var i in nPcapDeviceList)
                    {
                        base.Items.Add(i);
                    }
                }
                else // not windows
                {
                    libPcapDeviceList.Refresh();

                    foreach (var i in libPcapDeviceList)
                    {
                        base.Items.Add(i);
                    }
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// Refresh the device list
        /// </summary>
        public void Refresh()
        {
            lock (this)
            {
                // clear out any items we might have
                base.Items.Clear();
                libPcapDeviceList.Refresh();

                foreach (var i in libPcapDeviceList)
                {
                    base.Items.Add(i);
                }
            }
        }