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

            Console.SetOut(new StreamWriter(Path.Combine(Application.StartupPath, "update.log")));

            if (args != null && args.Length > 0)
            {
                string tempDir      = args[0];
                string manifestPath = "";
                if (args.Length > 1)
                {
                    manifestPath = args[1];
                }
                if (args.Length > 2)
                {
                    var processName = args[2];
                    Process.GetProcessesByName(processName).ToList().ForEach(p => p.Kill());
                }
                var installForm = new InstallForm(tempDir, manifestPath);
                Application.Run(installForm);
                return;
            }
#if !DEBUG
            //Application.ThreadException += Application_ThreadException;
#endif
            var connForm = new ConnectionForm();
            Application.Run(connForm);
        }
Beispiel #2
0
        private void WorkerRunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            DialogResult result = (e.Error != null) ? DialogResult.No : DialogResult.Yes;

            if (result == DialogResult.Yes)
            {
                Common.Start(_remoteRelease);
                Application.Exit();
            }
            else
            {
                var connForm = new ConnectionForm();
                connForm.Show();
                Close();
            }
        }
Beispiel #3
0
        private static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            if (args != null && args.Length > 0)
            {
                string tempDir           = args[0];
                string newVersionXmlPath = "";
                if (args.Length > 1)
                {
                    newVersionXmlPath = args[1];
                }
                var installForm = new InstallForm(tempDir, newVersionXmlPath);
                Application.Run(installForm);
                return;
            }
            var connForm = new ConnectionForm();

            Application.Run(connForm);
        }