Ejemplo n.º 1
0
 void Instance_DownloadAdded(object sender, DownloaderEventArgs e)
 {
     if (IsHandleCreated)
     {
         this.BeginInvoke((MethodInvoker)delegate() { AddDownload(e.Downloader); });
     }
     else
     {
         AddDownload(e.Downloader);
     }
 }
Ejemplo n.º 2
0
 void Instance_DownloadEnded(object sender, DownloaderEventArgs e)
 {
     Log(
         e.Downloader,
         String.Format(
         "Download ended {0}",
         e.Downloader.ResourceLocation.URL),
         LogMode.Information);
 }
Ejemplo n.º 3
0
        void Instance_DownloadRemoved(object sender, DownloaderEventArgs e)
        {
            this.BeginInvoke((MethodInvoker)delegate()
            {
                ListViewItem item = mapDownloadToItem[e.Downloader] as ListViewItem;

                if (item != null)
                {
                    if (item.Selected)
                    {
                        lastSelection = null;
                    }

                    mapDownloadToItem[e.Downloader] = null;
                    mapItemToDownload[item] = null;

                    item.Remove();
                }
            }
            );
        }