private void buttonInstallSelected_Click(object sender, EventArgs e) { ModInfo selMod = GetSelectedMod(); if (!selMod) { return; } ArchiveManager.InstallSelected(selMod); }
private void installAllFilesToolStripMenuItem_Click(object sender, EventArgs e) { ModInfo selMod = GetSelectedMod(); if (!selMod) { return; } buttonCheckAll_Click(null, null); ArchiveManager.InstallSelected(selMod); ArchiveManager.DeleteEmptyDirs(Serializer.GetGameModFolder()); }
static void RestoreModState(ModInfo loadMod) { //a file being "installed" in this context means that it was installed when the loadout was saved //so we need to make sure files that werent installed, get uninstalled now when restoring the loadout foreach (var file in loadMod.archiveFiles) { file.belongingNode = new TreeNode() { Checked = !file.GetInstalledStatus() } } ; ArchiveManager.UninstallSelected(loadMod, false, true); //Check the ones that actually should be installed and install them foreach (var file in loadMod.archiveFiles) { file.belongingNode.Checked = file.GetInstalledStatus(); } ArchiveManager.InstallSelected(loadMod, false); } }