private WebPageDataModel DownloadData(string item)
        {
            WebPageDataModel model = new WebPageDataModel();
            WebClient        wc    = new WebClient();

            model.WebPageUrl     = item;
            model.WebPageContent = wc.DownloadString(item);
            return(model);
        }
        private void BeginDownloadSync()
        {
            List <string> webContent = PrepareContent();

            SetProgressBar(webContent);


            foreach (var item in webContent)
            {
                pb_loading_bar.Value += 1;
                WebPageDataModel model = DownloadData(item);
                PrintResultInListBox(model);
            }
        }
 private void PrintResultInListBox(WebPageDataModel model)
 {
     lb_content_view.Items.Add($"The content of {model.WebPageUrl} was downloaded. It contains {model.WebPageContent.Length} characters.");
 }