Example #1
0
        private void ResultShowWebList(List <WebSource> webSources)
        {
            WebView.BeginUpdate();
            WebView.Items.Clear();

            foreach (var sourceItem in webSources)
            {
                //1st
                var lvi = new ListViewItem(sourceItem.Sequence);
                lvi.UseItemStyleForSubItems = false;
                //2nd
                lvi.SubItems.Add(sourceItem.Url);
                //3rd
                lvi.SubItems.Add(sourceItem.ConnectionStatus);
                lvi.SubItems[2].BackColor = sourceItem.StatusColor;
                WebView.Items.Add(lvi);
            }
            WebView.EndUpdate();
            WebView.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
            WebView.GridLines = Enabled;
        }