The arguments provided when a batch of hosts is discovered.
Inheritance: System.EventArgs
コード例 #1
0
ファイル: HostListCtrl.cs プロジェクト: yuriik83/UA-.NET
        private void HostEnumerator_HostsDiscovered(object sender, HostEnumeratorEventArgs e)
        {
            if (this.InvokeRequired)
            {
                this.BeginInvoke(new EventHandler<HostEnumeratorEventArgs>(HostEnumerator_HostsDiscovered), sender, e);
                return;
            }

            // check if this is the first callback.
            if (m_waitingForHosts)
            {
                ItemsLV.Items.Clear();
                m_waitingForHosts = false;
            }

            // populate list with hostnames.
            if (e != null && e.Hostnames != null)
            {
                foreach (string hostname in e.Hostnames)
                {
                    AddItem(hostname);
                }
            }
                
            AdjustColumns();
        }