Beispiel #1
0
        static void Main(string[] args)
        {
            if (args.Length > 0)
            {
                if (args.Length == 2 && args[0] == "--upgrade" && Directory.Exists(args[1]))
                {
                    Installation.Upgrade(args[1]);
                }

                if (args[0] == "--install")
                {
                    Installation.Install();
                }
            }

            Application.EnableVisualStyles();
            Application.SetHighDpiMode(HighDpiMode.PerMonitorV2);
            Application.SetCompatibleTextRenderingDefault(false);

            if (Installation.GetInstallationStatus() == Installation.Status.FirstLaunch)
            {
                new FirstLaunch().ShowDialog();
            }

            Settings.Load();
            Application.Run(new MainForm(args));
        }
        private void bInstall_Click(object sender, EventArgs e)
        {
            var options = new Installation.UninstallationOptions();

            options.RecoverOriginalFiles    = cb_recover_orig.Checked;
            options.DeleteAllModLoaderFiles = rb_delete.Checked;
            options.KeepSettings            = cbKeepConfigs.Checked;
            options.UninstallAndDeleteOCMI  = cb_Uninstall_OCMI.Checked && options.DeleteAllModLoaderFiles;

            if (bInstall.Text == "Install")
            {
                Installation.Install();
            }
            else if (bInstall.Text == "Uninstall")
            {
                Installation.Uninstall(options);
            }

            UpdateInstallationStatus();
        }
Beispiel #3
0
 private void bYes_Click(object sender, EventArgs e) => Installation.Install();