示例#1
0
        private async void /*task == void pero en eventos es void*/ Button2_ClickAsync(object sender, EventArgs e)
        {
            List <WebSite> listaDownload = await AsyncClass.DownloadWebAsync();

            AddListbox(listaDownload);
        }
示例#2
0
        //web site data model
        //private void Button3_Click(object sender, EventArgs e)
        //{
        //    var listaDownload = AsyncClass.DownloadWebParallelAsyncParallel();
        //    var listaResultados = listaDownload.Result.ToList();
        //    foreach (var item in listaResultados)
        //    {
        //        listBox1.Items.Add(item);
        //    }
        //}



        private void Button5_Click(object sender, EventArgs e)
        {
            var listaDownload = AsyncClass.DownloadWebParallel();

            AddListbox(listaDownload);
        }
示例#3
0
        private void Button1_Click(object sender, EventArgs e)
        {
            List <WebSite> listaDownload = AsyncClass.DownloadWebSync();

            AddListbox(listaDownload);
        }