public static void doResetApp() { patched = new Dictionary <string, Dictionary <string, string> >(); MCC_version = getCurrentBuild(); saveCfg(); Modpacks.loadModpacks(); if (!Backups.deleteAll(true)) { form1.showMsg("There was an issue deleting at least one backup. Please delete these in the Backups tab to avoid restoring an old " + "version of the file in the future.", "Error"); } Backups.loadBackups(); }
private void Form1_Load(object sender, EventArgs e) { version_lbl.Text = Config.version; Config.form1 = this; int r = Config.loadCfg(); if (r == 3) { showMsg("MCC Mod Manager cannot load because there are problems with the configuration file.", "Error"); Environment.Exit(1); } Backups.form1 = this; Backups.loadBackups(); if (r == 2) { patchButton.Enabled = false; delModpack.Enabled = false; restoreSelectedBtn.Enabled = false; restoreAllBaksBtn.Enabled = false; delSelectedBak.Enabled = false; delAllBaksBtn.Enabled = false; manualOverride.Enabled = false; megaCaution.Visible = true; tt.SetToolTip(megaCaution, "MCC Mod Manager has detected an update and needs to stabilize the game. Please restart the app."); } else if (r == 1) { Modpacks.stabilizeGame(); Backups.loadBackups(); } Modpacks.form1 = this; Modpacks.loadModpacks(); AssemblyPatching.form1 = this; IO.form1 = this; pBar_init(); tt.SetToolTip(addRowButton, "Select mod file(s) to add"); }
private void manualOverride_CheckedChanged(object sender, EventArgs e) { if (manualOverride.Checked == false) // make warning only show if checkbox is getting enabled { Modpacks.loadModpacks(); return; } else { DialogResult ans = showMsg("Please do not mess with this unless you know what you are doing or are trying to fix a syncing issue.\r\n\r\n" + "This option allows you to click the red/green icons beside modpack entries to force the mod manager to flag a modpack as enabled/disabled. " + "This does not make changes to files, but it does make the mod manager 'think' that modpacks are/aren't installed." + "\r\n\r\nEnable this feature?", "Question"); if (ans == DialogResult.No) { manualOverride.Checked = false; return; } Modpacks.loadModpacks(); } }
private void refreshButton_Click(object sender, EventArgs e) { Config.loadCfg(); Backups.loadBackups(); Modpacks.loadModpacks(); }