[MonoDevelop] How to download a file?

Jacob Ilsø Christensen jacobilsoe at gmail.com
Tue Sep 19 17:20:27 EDT 2006


On 9/19/06, Carlos Adriano Portes <xcap2000 at gmail.com> wrote:
> All I know to do is to execute a externer process, for instance:
>
> using System;
> using System.Diagnostics;
>
> namespace Estudo
> {
>         public class ExternalProcess
>         {
>                 public static void Main(string[] args)
>                 {
>                         if(args.Length == 1)
>                         {
>                                 Process pr = new Process();
>                                 pr.EnableRaisingEvents = false;
>                                 pr.StartInfo.FileName = "ls";
>                                 pr.StartInfo.Arguments = "-la " + args[0];
>                                 pr.Start();
>                                 pr.WaitForExit();
>                                 if(pr.ExitCode != 0)
>                                 {
>                                         Console.WriteLine("Error while using ls.");
>                                 }
>                         }
>                 }
>         }
> }
>
> but I do not know how to read its output and use a separate thread in
> c#, could you help me...
>

A quick google search gave this:

http://www.codeproject.com/csharp/LaunchProcess.asp

/Jacob

> 2006/9/19, Jacob Ilsø Christensen <jacobilsoe at gmail.com>:
> > I guess you would spawn wget in a separate thread and continually read
> > its standard output to update the progress bar. You can find
> > documentation on the progressbar here:
> >
> > http://go-mono.com/docs/monodoc.ashx?link=T%3aGtk.ProgressBar
> >
> > /Jacob
> >
> >
> >
> > On 9/19/06, Carlos Adriano Portes <xcap2000 at gmail.com> wrote:
> > > Hi
> > >
> > > I would like to know how to download a file using wget and show its
> > > progress in a progress bar from my application, can someone give me an
> > > example?
> > > _______________________________________________
> > > Monodevelop-list mailing list
> > > Monodevelop-list at lists.ximian.com
> > > http://lists.ximian.com/mailman/listinfo/monodevelop-list
> > >
> >
>


More information about the Monodevelop-list mailing list