Exemple #1
0
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            if (args.Length == 0)
            {
                MessageBox.Show("No file to download.");
            }

            // get save directory
            string path = GetDirectory();

            if (!string.IsNullOrEmpty(path))
            {
                if (args.Length > 1)
                {
                    MainWin2 win2 = new MainWin2();
                    win2.InitializeParameters(args, path);
                    Application.Run(win2);
                }
                else
                {
                    MainWin win = new MainWin();
                    win.InitializeParameters(args[0], path);
                    Application.Run(win);
                }
            }
        }