Exemplo n.º 1
0
        private void ButtonUpdateAuroraLoader_Click(object sender, EventArgs e)
        {
            var auroraLoaderMod = _modRegistry.Mods.Single(mod => mod.Name == "AuroraLoader");

            MessageBox.Show($"Installing AuroraLoader {auroraLoaderMod.Listing.LatestVersion}");
            try
            {
                var thread = new Thread(() => _modRegistry.UpdateAuroraLoader(auroraLoaderMod));
                thread.Start();
                var progress = new FormProgress(thread);
                progress.ShowDialog();
                Process.Start("update_loader.bat");
                Application.Exit();
                return;
            }
            catch (Exception exc)
            {
                Log.Error("Failed to update AuroraLoader", exc);
                MessageBox.Show("Update failed.");
            }
        }