Example #1
0
        /// <summary>
        /// 刷新hostList按钮点击事件的响应函数
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button_refreshHostList_Clicked(object sender, EventArgs e)
        {
            if (listView_hostList.Items != null)
            {
                listView_hostList.Items.Clear();
            }

            LanEnum             myLanEnum = new LanEnum();
            List <ListViewItem> result    = myLanEnum.getResult();

            this.listView_hostList.BeginUpdate();

            if (result != null)
            {
                foreach (ListViewItem p in result)
                {
                    listView_hostList.Items.Add(p);
                }
            }

            this.listView_hostList.EndUpdate();
        }
Example #2
0
        /// <summary>
        /// 刷新hostList按钮点击事件的响应函数
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button_refreshHostList_Clicked(object sender, EventArgs e)
        {
            if (listView_hostList.Items != null)
            {
                listView_hostList.Items.Clear();
            }

            LanEnum myLanEnum = new LanEnum();
            List<ListViewItem> result = myLanEnum.getResult();

            this.listView_hostList.BeginUpdate();

            if (result != null)
            {
                foreach (ListViewItem p in result)
                {
                    listView_hostList.Items.Add(p);
                }
            }

            this.listView_hostList.EndUpdate();
        }