예제 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            var myWriter = new ListBoxTraceListener(listBox1);
            var downloader = new Downloader(myWriter);

            if (!string.IsNullOrWhiteSpace(cookieBox.Text))
            {
                downloader.Download(textBox1.Text, textBox2.Text, cookieBox.Text);
            }

            downloader.Download(textBox1.Text, textBox2.Text);
        }
예제 #2
0
        static void Main(string[] args)
        {
            if (args.Length == 0)
            {
                Console.WriteLine("At least one module name is required");
                Console.Read();
                return;
            }

            var myWriter = new ConsoleTraceListener();

            var downloader = new Downloader(myWriter);

            foreach (var s in args)
            {
                downloader.Download(s, ConfigurationManager.AppSettings["folder"]);
            }

            Console.WriteLine("DONE!!");
            Console.Read();
        }