Exemple #1
0
 public static DialogResult DownloadAndUnpack(string URL, string Dir, string Title, string NamePrefixToDrop, UnpackFilter filter)
 {
     try
     {
         DownloadProgressForm frm = new DownloadProgressForm(URL, Dir, NamePrefixToDrop);
         frm._Filter = filter;
         frm.Text    = Title;
         return(frm.ShowDialog());
     }
     catch (System.Exception)
     {
         return(DialogResult.Cancel);
     }
 }
 public static DialogResult DownloadAndUnpack(string URL, string Dir, string Title, string NamePrefixToDrop, UnpackFilter filter)
 {
     try
     {
         DownloadProgressForm frm = new DownloadProgressForm(URL, Dir, NamePrefixToDrop);
         frm._Filter = filter;
         frm.Text = Title;
         return frm.ShowDialog();
     }
     catch (System.Exception)
     {
         return DialogResult.Cancel;
     }
 }
 public static byte[] DownloadToArray(string URL, string Title, string NamePrefixToDrop)
 {
     try
     {
         DownloadProgressForm frm = new DownloadProgressForm(URL, null, NamePrefixToDrop);
         frm.Text = Title;
         if (frm.ShowDialog() == DialogResult.Cancel)
             return null;
         return frm.DownloadedData;
     }
     catch (System.Exception)
     {
         return null;
     }
 }
Exemple #4
0
 public static byte[] DownloadToArray(string URL, string Title, string NamePrefixToDrop)
 {
     try
     {
         DownloadProgressForm frm = new DownloadProgressForm(URL, null, NamePrefixToDrop);
         frm.Text = Title;
         if (frm.ShowDialog() == DialogResult.Cancel)
         {
             return(null);
         }
         return(frm.DownloadedData);
     }
     catch (System.Exception)
     {
         return(null);
     }
 }