private void DeleteMods_Click(object sender, RoutedEventArgs e) { MessageBoxResult result = MessageBox.Show("This will uninstall all of your mods and delete everything that's been downloaded.\nYou sure about this?", "Oi", MessageBoxButton.YesNo); if (result != MessageBoxResult.Yes) { return; } ModManager.silent = true; foreach (Mod mod in downloadedModList.collection) { ModManager.UninstallMod(mod); try { Directory.Delete(mod.GetDownloadDirectory(), true); } catch (IOException) { } } ModManager.silent = false; downloadedModList.RefreshCollection(); }
private void UninstallSelected_Click(object sender, RoutedEventArgs e) { foreach (Mod mod in DG.SelectedItems) { ModManager.UninstallMod(mod); } }
private void CheckBox_Click(object sender, RoutedEventArgs e) { foreach (Mod mod in DG.SelectedItems) { if (mod.isInstalled) { ModManager.UninstallMod(mod); } else { ModManager.ActivateMod(mod); } } }