/// <summary>
 /// Download an entire site.
 /// </summary>
 /// <param name="config">The spider configuration file to use.</param>
 /// <param name="baseHost">The URL to start from.</param>
 /// <param name="local">The local path to save files to.</param>
 public void Download(String config, Uri baseHost, String local)
 {
     WorldSpiderReport report = new WorldSpiderReport(local);
     SpiderOptions options = new SpiderOptions();
     options.Load(config);
     Spider spider = new Spider(options, report);
     spider.AddURL(baseHost, null, 1);
     spider.Process();
     Console.WriteLine(spider.Status);
 }
        /// <summary>
        /// Download an entire site.
        /// </summary>
        /// <param name="config">The spider configuration file to use.</param>
        /// <param name="baseURL">The URL to start from.></param>
        /// <param name="local">The local path to save files to.</param>
        public void Download(String config, Uri baseURL, String local)
        {
            SpiderReport report = new SpiderReport(local);
            SpiderOptions options = new SpiderOptions();
            options.Load(config);
            Spider spider = new Spider(options, report);
            spider.Logging.Console = true;
            spider.Logging.Filename = "c:\\spider.log";
            spider.Logging.Clear();

            spider.AddURL(baseURL, null, 1);
            spider.Process();
            Console.WriteLine(spider.Status);
        }
        static void Main(String[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            MainForm form = new MainForm();
            if (args.Length < 1)
            {
                MessageBox.Show("Please pass a path to a spider configuration file as an argument to this program (i.e. Recipe13_4 c:\\spider.conf).", "Heaton Research Spider");
                return;
            }

            SpiderOptions options = new SpiderOptions();
            options.Load(args[0]);
            form.Options = options;
            
            Application.Run(form);
        }